This has basically been killing me the last few days, so here I share my experience to save you some time. Please follow these steps sudo tasksel install lamp-server (type down the password for your mysql installation) sudo apt-get
Add a swap to EC2 micro instance!
Those 640MB RAM in a micro instance will not get you far.. but sometimes for the sake of testing – you might want to enable swap. Here is a fast how to create a swap as a file.. sudo