Install lamp on ubuntu14.04

By: Ryan Wong at

Here’s a list of steps to install lamp on a fresh server.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
sudo apt-get update
sudo apt-get install apache2
sudo apt-get install mysql-server php5-mysql

sudo mysql_install_db
sudo mysql_secure_installation

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

sudo nano /etc/apache2/mods-enabled/dir.conf

Add
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>

sudo service apache2 restart

sudo apt-get install php5-package1 php5-package2 ...