After trawling through a few methods on how to get Drupal up and running in Linux (Ubuntu) and patching together pieces from each. I decided to write a method to get XAMPP installed in one easy to follow guide. With this you can install and develop your Drupal websites locally on any linux osx.

  1. First thing you need to do is get a hold of XAMPP for Linux from here:

XAMPP 1.7.4

Ensure that its downloaded to a directory you can easily access

  1. Next you need to unpack and install the tar.gz file. To do this open up the terminal (applications–>accessories–>terminal), navigate to the folder you have just downloaded to and type:

    sudo tar xvfz xampp-linux-1.7.4.tar.gz -C /opt

once you’ve done this XAMPP has been installed in the /opt directory in /filesystem/opt

  1. Before we go any further we need to be able to write to the htdocs folder (this is where your website files are stored). To do this firstly lets enable modification of the /opt/htdocs directory. In terminal type

    sudo chmod a+w /opt/lampp/htdocs

  2. Next create a link between this directory and a location of your choice that’s easy to navigate to (i.e. /home/user/websites). In terminal type:

    sudo ln -s /opt/lamp/htdocs /home/user/name of folder

  3. All done, now let’s test out the XAMPP server to make sure its working. In terminal to start and stop XAMPP is very easy:

To start type – sudo /opt/lampp/lampp start

you should see the following lines in the terminal:

Starting XAMPP for Linux 1.7.4...
XAMPP: Starting Apache with SSL (and PHP 5)...
XAMP: Starting MYSQL....
XAMPP: Starting ProFTPD...
XAMPP for Linux started.
  1. Next open up your web browser and type:

http://localhost

You should be presented with this screen

If not, try again. Now you can install Drupal on Linux by following this blog.