LAMP stack kickstart script for AWS with PHP55

August 11, 2014

I’ve been messing around with Puppet and Vagrant a lot at work recently working to automate our infrastructure. However, I had an idea for a little website and I just wanted to get started on some basic things with the site and not have to worry about a whole complicated Puppet setup.

AWS has a tutorial for setting up a basic lamp stack on the EC2 instances and I thought it would be handy to make that in to a little bash run all the commands in the tutorial.

I liked the idea of the bash script because it can still automate everything but it’s very easy/quick to setup and debug. One thing about the tutorial is that uses an old version of PHP (5.3) which I didn’t want to use so I took a little time to get it setup with 5.5

The script is broken in to 2 parts because there is a reboot required (as outlined in the tutorial). In the second part I also have the script install a couple of tools for using Drupal as that was the CMS I was using for the project as well a create test index.php file to show that the stack is working.