
Quick Guide: Installing AMP on Ubuntu
So I’ve been asked a few times how to install AMP on Ubuntu, and if you’re anything like me, you don’t want to have to spend time reading through some long guide, so I’ll be quick and get to the grits of it.
Admittedly, while an unpopular opinion, I’m a bit of an apt fanboy for package management.
First things first, let’s update the server:
sudo apt-get update && apt-get upgrade
- Install AMP
sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server
- Install Apache
sudo apt-get install apache2
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop
- Install PHP
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
- Install MySQL
sudo apt-get install mysql-server
- (Optional) Install PHPMyAdmin
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
That’s it!
NOTE: This should work on Ubuntu versions 8.04 (LTS) or earlier.