Installing XAMPP on ubuntu 11.04

This is a “how to” for setting up the XAMPP server on Ubuntu to produce a web development environment. This “how to” will install the XAMPP stack into /opt and link the htdocs folder to a folder in your local home folder. This avoids permission problems whilst development work is ongoing.

Step 1

Download the latest version of XAMPP from here.

Step 2

Extract the archive to /opt using sudo (make sure you are in the directory that you downloaded the archive to).

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

Thats it!

Step 3

to start or stop the server use

1 sudo /opt/lampp/lampp start
2 sudo /opt/lampp/lampp stop

The pages should now be available at http://localhost

Step 4

XAMPP uses /opt/lampp/htdocs as the default web folder. It is much cleaner for development purposes to use a folder within your home page. The creation of a symbolic link is suggested linking the /opt/lampp/htdocs folder to your home folder.
Assuming your name is david and you want a web development folder with public_html within this then use the following command.
I have set up the following folder structure within my home folder:

1 /home/david/webdev/public_html

to create the link

1 sudo ln -s /home/david/webdev/public_html /opt/lampp/htdocs/$USER

any files or folders in the public_html folder will now be served by the XAMPP server.




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s