Install Apache
Open Terminal (Application -> Accessories -> Terminal) and execute the following command:
sudo apt-get install apache2
check if the Apache is working properly by pointing your browser to
http://localhost. If you see the text “It works!”, it means Apache is working.
Issue the following command to resolve following error
“Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName“
sudo gedit /etc/apache2/conf.d/fqdn
When Gedit opens, type “ServerName localhost” inside the file and click Save
Install PHP
Inside Terminal, execute the following command:
sudo apt-get install php5 libapache2-mod-php5
execute this to restart apache
Execute the following command in Terminal:
sudo /etc/init.d/apache2 restart
Install MySql
sudo apt-get install mysql-server
Inside Terminal, execute the following command:
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
Give the root password to complete the installation