Tuesday, 23 September 2014

AWS Ubuntu Server 14.04 install LAMP stack

I've done this more times than I care to remember lately so I'm going to remember it here.

Boot up an AWS Ubuntu Server 14.04 instance, use MobaXterm to log in with ubuntu as the username then:

sudo apt-get update

Don't worry about grub - it's not used as far as I'm aware

sudo apt-get upgrade

Install LAMP (don't forget a password for root on MySQL)

sudo apt-get install lamp-server^

The web-root directory is /var/www/html so we'll give ourselves permission to play there using (adapted from Ulyssesonline):

sudo chgrp www-data /var/www/html
sudo chmod 775 /var/www/html
sudo chmod g+s /var/www/html
sudo usermod -a -G www-data ubuntu
sudo chown ubuntu /var/www/html/

We'll also need curl:

sudo apt-get install php5-curl

and Mcrypt:

sudo apt-get install php5-mcrypt
sudo php5enmod mcrypt
sudo service apache2 reload

Sort out Mod-rewrite

sudo a2enmod rewrite
sudo service apache2 restart

Move to web-root

cd /var/www/html/

Next to figure out how to install Laravel.