Try the following code in terminal:
sudo apt-get install apache (For installing Apache web server)
sudo apt-get install php (Install the latest version of PHP)
sudo apt-get install mysql-server (Install the latest version of MySQL server)
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin (To link phpmyadmin in your webserverâ€™s root directory)
sudo /etc/init.d/apache2 force-reload (To force restart Apache server (now you could access localhost/phpmyadmin from your web browser)
Thatâ€™s It! In the installation you may be asked for mysql password for root. Set as you wish but remember it as you will need it.
Thanks: Ronju vai