Tuesday, January 17, 2012

LAMP stacks on Xubuntu 11.10

Recently I've been evaluating several php applications written for the LAMP stack. To do this, I decided to install a LAMP stack on my pc, which is running on xubuntu 11.10. There is more than 1 way to achieve this end. Here are my observations on 3 methods.

  • XAMPP, from http://www.apachefriends.org/, includes everything in one package.
  • lamp_server, a package from the Ubuntu repository.
  • Individually install all the pieces from the Ubuntu repository.

XAMPP
It's hard to beat xampp for ease of install. Just extract the archive into /opt. It comes with a handy
lamppcommand line tool to start and stop all the services. However, I started spending a lot of time resolving side issues. It wasn't compatible with MySQL Administrator. The package includes phpMyAdmin. Overall, it's ok, but I run into issues and end up at the mysql command line. And I found that another package I installed was starting up another apache web server instance, causing conflicts. I also found that I had to tweak the php.ini file to suppress error messages, or the packages I was evaluating would not render correctly.




lamp_server
To install this, you need a terminal:

sudo apt-get install lamp_server^

This gave me grief. The install failed when setting the MySQL root user password. When I tried to uninstall the package, it failed with an unresolved dependency on mono_document. I've realized that I'm not actually going to use mono for now, so I uninstalled that package, and again entered:


sudo apt-get remove lamp_server^

This time, it didn't fail. But I noticed that it wasn't ending, either. I looked more closely, and realized that it was removing everything. I aborted, but it was too late. I couldn't even re-boot, the os was damaged.


After
re-installing a clean copy of Xubuntu 11.10, I decided to
install the standard Ubuntu packages individually:


sudo apt-get install mysql-server mysql-client
sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5 php5-mysql

At this point, I am now up and running with a supported lamp stack.MySQL Administrator works correctly and I don't have to depend on phpMyAdmin. The apache server is started and stopped automatically. I also did not have to tweak the php error message display level. To me, this has a production feel to it, and this is the correct installation for me to evaluate existing software.

Friday, January 13, 2012

Installing XAMPP and Drupal on Xubuntu 11.10

I'm evaluating CiviCRM, a contact relationship manager which is installed as a module in either Joomla or Drupal.
I could install Apache web server in Ubuntu by using apt-get, but then I will have little control over the versions of software installed, so I'm starting with a custom install of XAMPP. Visit
http://www.apachefriends.org/en/xampp-linux.html
, and download the the latest version of software. Then open a console shell and enter:

sudo tar xvfz ~/Downloads/xampp-linux-1.7.7.tar.gz -C /opt

That's it. I also made the following changes to the /opt/lampp/etc/php.ini file:

display_errors = Off display_startup_errors = Off output_buffering = Off

These 'production' settings are recommended by the Joomla install process and prevent warning messages from displaying all over your web pages. Now start XAMPP:

sudo /opt/lampp/lampp start

Test your installation by pointing your browser to localhost.
Now to install Joomla, visit joomla.org, and download the latest version. Because I don't know Joomla I'm going to create two sites - a reference site named joomla_demo, and a working site named joomla_crm

sudo mkdir /opt/lampp/htdocs/joomla_demo
sudo unzip ~/Downloads/Joomla_1.7.3-Stable-Full_Package.zip -d /opt/lampp/htdocs/joomla_demo
sudo chmod -R 755 /opt/lampp/htdocs/joomla_demo
sudo chown -R nobody:nogroup /opt/lampp/htdocs/joomla_demo
sudo mkdir /opt/lampp/htdocs/joomla_crm
sudo unzip ~/Downloads/Joomla_1.7.3-Stable-Full_Package.zip -d /opt/lampp/htdocs/joomla_crm
sudo chmod -R 755 /opt/lampp/htdocs/joomla_crm
sudo chown -R nobody:nogroup /opt/lampp/htdocs/joomla_crm

Now, browse to localhost/joomla_crm, and follow the installation instructions. For database name, I entered 'joomla', and for prefix, I entered 'crm_'. Note that I could also have used 2 separate databases.
To install CicivCRM, I enter my joomla_crm site as administrator, and select Extension Manager. The instructions are to enter the sourceforge url into the Install URL field. But sourceforge doesn't cooperate. Instead, I install if from my own local web server:

sudo cp ~/Downloads/civicrm-4.0.8-joomla.zip /opt/lampp/htdocs

Now, for Install URL, enter http://localhost/civicrm-4.0.8-joomla.zip And the install is successful. Next, I'll create my evaluation sites for Drupal.

Tuesday, January 3, 2012

Installing XAMPP and Joomla on Xubuntu 11.10

I'm evaluating CiviCRM, a contact relationship manager which is installed as a module in either Joomla or Drupal. In my last post, I installed CiviCRM with Joomla (Installing XAMPP and Joomla on Xubuntu 11.10). Today, I'll be installing CiviCRM with Drupal.

I'm starting with a custom install of XAMPP. I installed the the latest version from http://www.apachefriends.org/en/xampp-linux.html. Download the tarball, and then open a console shell:

sudo tar xvfz ~/Downloads/xampp-linux-1.7.7.tar.gz -C /opt

That's it. I also made the following changes to the /opt/lampp/etc/php.ini file:

display_errors = Offdisplay_startup_errors = Offoutput_buffering = Off

These 'production' settings will prevent warning messages from displaying all over your web pages. Now start XAMPP, and test your installation by pointing your browser to localhost. 

sudo /opt/lampp/lampp start

Visit www.drupal.org, and download the latest version of Drupal. I created two sites - a reference site named drupal_demo, and a working site named drupall_crm

sudo mkdir /opt/lampp/htdocs/drupal_demo
sudo unzip ~/Downloads/drupal-7.10.zip -d opt/lampp/htdocs/drupal_demo
sudo chmod -R 755 /opt/lampp/htdocs/drupal_demo
sudo chown -R nobody:nogroup /opt/lampp/htdocs/drupal_demo 

Browse to localhost/drupal_demo, and follow the installation instructions, using database name 'drupal_demo'.

sudo mkdir /opt/lampp/htdocs/drupal_crm
sudo unzip ~/Downloads/drupal-7.10.zip -d /opt/lampp/htdocs/drupal_crm
sudo chmod -R 755 /opt/lampp/htdocs/drupal_crm
sudo chown -R nobody:nogroup /opt/lampp/htdocs/drupal_crm

Again, browse to localhost/drupal_crm, and follow the installation instructions. For database name, I used 'drupal_crm'.

To install CiviCRM, I first copy the install package to the web root:

sudo cp ~/Downloads/civicrm-4.0.8-drupal.tar.gz /opt/lampp/htdocs

Then I enter my drupal_crm site as administrator, and select Modules --> Install new module, and I install if from my own local web server, entering: http://localhost/civicrm-4.0.8-drupal.tar.gz

This just seems to unpack the files, and does not automatically start the CiviCRM install process, as Joomla did. To start the install, point the browser to http://localhost/drupal_crm/sites/all/modules/civicrm/install/index.php

Now I have CiviCRM installed in both Joomla and Drupal. As I move forward evaluating CiviCRM, I'll also be comparing Joomla vs. Drupal as my choice of infrastructure.