Installing Apache, PHP and MySQL on Ubuntu 13.04

1. Update.
sudo apt-get update

2. Install Apache
sudo apt-get install apache2

3. Check if Apache is running, navigate to http://localhost/

4. Install PHP
sudo apt-get install php5 libapache2-mod-php5

5. Restart Apache
sudo service apache2 restart

6. Check to make sure PHP has successfully installed
cd /var/www/
sudo rm index.html
sudo nano index.php

– Now type, inbetween php tags;
echo phpinfo();

7. Install MySQL
sudo apt-get install mysql-server php5-mysql

8. Install phpMyAdmin
sudo apt-get install phpmyadmin

9. Edit the Apache Configuration file
sudo nano /etc/apache2/apache2.conf

10. Add the following line to the end of the file;
Include /etc/phpmyadmin/apache.conf

11. Link phpMyAdmin to the /var/www/ directory
sudo ln -s /usr/share/phpmyadmin /var/www/

12. AllowNoPassword (Optional, only if you set the mysql password to nothing.)
sudo nano /etc/phpmyadmin/

13. Uncomment the following line in;
$cfg[‘Servers’][$i][‘AllowNoPassword’] = TRUE;

14. Restart Apache
sudo service apache2 restart