Install Apache, MySQL PHP and phpMyAdmin on Ubuntu 13.04, The Easy Way

Sharing it if you like it!

Today I’m setting up a new VPN running Ubuntu 13.04 (Raring Ringtail) for a web app I’m developing and figured whats a better first post then a LAMP installation tutorial!?!

LAMP is a type of web server configuration that stands for Linux Apache MySQL & PHP. I’ll walk through installing each of these along with phpMyAdmin in 7 easy steps. Lets Get Started!

1) The first thing you’ll want to do is SSH into your server an do a fresh update and upgrade.

sudo apt-get update
sudo apt-get upgrade

2) Install MySQL. You’ll be prompted to enter a root password. Pick something strong but rememberable.

sudo apt-get install mysql-server mysql-client

3) Install Apache

sudo apt-get install apache2

4) Install PHP

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

5) Now lets restart Apache to activate PHP

/etc/init.d/apache2 restart

6) Install phpMyAdmin. When you get to the prompt where it ask if you want allow “dbconfig-common” to handle the installation and configuration of database just enter the letter “Y” and retype your password from step 2.

sudo apt-get install phpmyadmin

7) Reboot Apache one last time to complete the LAMP configuration

/etc/init.d/apache2 restart

Your LAMP server should now be up an running. You can also access phpMyAdmin by going to YourDomainName/phpmyadmin. Enjoy!


Although this tutorial is intended for Ubuntu 13.04 there seems to be some changes to how you install PHP my admin in new version. All the above steps still works the same except the phpmyadmin fix below.

If phpmyadmin isn’t working after finishing the above steps
Create a link in /var/www like this:

sudo ln -s /usr/share/phpmyadmin /var/www/

…And since 14.04 you may want to use /var/www/html/ instead of /var/www/

If thats not working for you, you need to include phpmyadmin inside apache configuration.

Open apache.conf using your favorite editor, mine is vim 🙂

sudo vim /etc/apache2/apache2.conf

Then add the following line:

Include /etc/phpmyadmin/apache.conf