Initially update repository for latest version of the software and upgrade your Ubuntu Operating System.

#sudo apt-get update

#sudo apt-get upgrade

Installing MySQL database package

#sudo apt-get install mysql-server mysql-client

This will install the latest stable version of mysql database server version and client version too.

Installing apache2 package

#sudo apt-get install apache2

Installing php5

#sudo apt-get install php5 libapache2-mod-php5 php5-mysql

Installing phpmyadmin

#sudo apt-get install phpmyadmin

Restarting apache2

#sudo service apache2 restart


#/etc/init.d/apache2 restart

These are simple and basic installation procedure. But based upon usage and security more advanced configuration and related modules can be installed for more complex functionality.