Firstly we will need to open console terminal and write the following
User@TheUbuntuBox ~# sudo apt-get install apache2 autoconf automake1.4 autotools-dev libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php-pear php5-ldap php5-mhash php5-mysql php5-mysqli php5-snmp php5-sqlite php5-xmlrpc php5-xsl php5-imap php5-mcrypt php5-pspell php5-gd autoconf automake1.4 autotools-dev libapache2-mod-php5 mysql-server
We just installed Apache2, MySQL Server and PHP5.
Now we should install the phpMyAdmin
User@TheUbuntuBox ~# su –
User@TheUbuntuBox ~# cd /var/www
User@TheUbuntuBox /var/www# svn checkout https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/tags/STABLE/phpMyAdmin phpMyAdmin
User@TheUbuntuBox /var/www# cd phpMyAdmin
User@TheUbuntuBox /var/www/phpMyAdmin# mkdir config
User@TheUbuntuBox /var/www/phpMyAdmin# chmod o+rw config
User@TheUbuntuBox /var/www/phpMyAdmin# pico config.sample.inc.php
Now we have to setup the phpMyAdmin.
Using the last command “pico config.sample.inc.php” we have opened the configuration file of phpMyAdmin and we should change the following lines:
$cfg[‘blowfish_secret’] = ”; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
should be changed to:
$cfg[‘blowfish_secret’] = ‘cookie’; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
Now we have to set root user and pass:
// $cfg[‘Servers’][$i][‘controluser’] = ‘pma’;
// $cfg[‘Servers’][$i][‘controlpass’] = ‘pmapass’;
pma is the username and pmapass is the password.
You can save the file using CTRL + O and then exit the pico editor using CTRL + X.
Now execute the following command:
User@TheUbuntuBox /var/www/phpMyAdmin# mv config.sample.inc.php config.inc.php
Now you have working web server + phpMyAdmin.