You can download the XAMPP package from Apache Friends website. The present release is available for a variety of operating systems.
For installation on Ubuntu I downloaded the tar.gz archive from Apache Friends
I decided to install xampp into /opt . Untar the downloaded file using the following command.
Earlier, the name of XAMPP project was LAMPP . Hence a folder named LAMPP will be created under /opt with all necessary files.
sudo tar -xzvf xampp-linux-1.7.3a.tar.gz -C /opt
You can start XAMPP using the following command from a terminal
Similarly you can stop xampp using
sudo /opt/lampp/lampp start
sudo /opt/lampp/lampp stop
Look for any error messages while running the commands.
Using XAMPP to write your web application
Now open up a browser and browse http://127.0.0.1 The following screens will appear .
You can access phpmyadmin from the tools section and work with mysql.
Now you can create a folder named public_html in your home directory.
Now you can link this folder to your apache document root as below.
sudo ln -s ~/public_html /opt/lampp/htdocs/$USER
You can write your HTML/php code using any editor and save it under public_html folder in your home directory. You can test your code by browsing to http://127.0.0.1/yourusername. ( Replace yourusername with your actual user name).
It is not advisable to set up XAMPP to a machine directly connected to internet. The XAMPP is designed as a beginners platform to learn LAMP. If you want to run a production system look else where for a secure installation of LAMP.