Installing Xampp for Linux(Ubuntu 11.10) is easy. Just download the archive and after download, execute the following command
$ sudo tar xvfz xampp-linux-1.7.4.tar.gz -C /opt
And this will extract the archive under /opt folder and to start the lampp
$ /opt/lampp/lampp start
But this is not enough. Still, I can’t add something else in my web server installation. Permissions need to be set in the htdocs folder for me to add or create files. Executing the command
$ ls -ld /opt/lampp/htdocs
Will display the following information
drwxr-xr-x 4 root root 4096 2009-04-14 00:38 htdocs
It means that htdocs directory owner still root. To make it more manageable, I change the group owner to more sensible name like www. But first, we need to add new group www by executing
$ sudo groupadd www
And add our current user to the group
$ sudo usermod -aG www gumz
Then change the htdocs group-owner recursively
$ sudo chgrp -R www /opt/lampp/htdocs
Then we will be going to use special permission called setgid. Taken from this source
$ sudo chmod 2775 /opt/lampp/htdocs
Finally, we need to log out for the changes to effect.
