1. Open Terminal and enter the following commands.
sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
sudo apt-get install mysql-server
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin
2. Now all you have to do is put your PHP files in /var/www/ inorder to see it when
you are at localhost
Reference:
http://blog.tomleo.com/2009/05/setting-up-your-ubuntu-904-desktop-for.html