XAMPP(Webserver) On Linux

Posted on August 8, 2008

I recently erased Fedora 9 from my hard drive, and installed Linux Mint. Im enjoying it so far but it didn’t come with a webserver. Heres a little tutorial on how to install XAMPP and get it up and running.

First of all, download XAMPP from sourceforge. As of writing this, the latest version is 1.6.7 so ill be referencing to that in the tutorial. Save it to your /home/$USER/ directory.

Extract the archive to your /opt/ directory.

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

Now its installed :)

To start it:

sudo /opt/lampp/lampp start

To stop it:

sudo /opt/lampp/lampp start

To launch the panel/manager:

sudo /opt/lampp/lampp panel

You can test if its on by going to http://localhost

To add files to the server, you would need to put them in /opt/lampp/htdocs/ but since that directory is owned by root, your user doesn’t have neccesary privilages. The easiest way to “get around” this is to set up a symlink folder in your home directory. You may be familiar with public_html or www directories on your webhosting, we are basically setting the same thing up here.

First we want to set up the directory we are going to link to in htdocs. So..

sudo mkdir /opt/lampp/htdocs/homefiles/

Then make the equivilant directory in our home directory.

mkdir ~/public_html/

And finally link them together.

sudo ln -S ~/public_html/ /opt/lampp/htdocs/homefiles/

So now we can put PHP files/whatnot into our ~/public_html/ folder and they will show up in localhost/homefiles/

Leave a Reply

You must be logged in to post a comment.

Categories