This is super fast and easy. Here we go:
Create and log into your http://aws.amazon.com account. Yadda yadda yadda.
Click the giant
Launch Instance button under the EC2 tab. I personally like to use Ubuntu (because its the best), so I chose Mr.
12.10 there in the middle, but you should choose whichever version of Ubuntu is highest by the time you stumble on this post.
Continue down this path of glory, choosing mostly defaults. There are, however, a few notable exceptions that can prevent you from driving 3 states in the wrong direction.
Definitely make a KeyPair. This allows you some nice login security that no one outside of MIT understands.
The standard ports security group will be good unless you need to open up a database to the outside world. If so, and if said database is MySQL, add port 3306.
PRO TIP: You cannot change your port security group once you set it. If you forget a port, you will have to relaunch a new EC2 instance. Luckily this is easy.
I mean... Elastic Internet Protocol address. Wrong IP. At any rate, under
Network & Security on the left, select
Elastic IPs. You want to allocate a new address (at the top), then associate it with your brand spanking new EC2 instance that is currently spinning up.
You downloaded a copy of your key, so now you're ready to do something like this:
ssh -i /path/to/key-pair/file/you/just/downloaded/MyKey.pem ubuntu@MY-SHINY-NEW-IP
You should expect to see some jargon like this:
yes or go home.
If we're on the same page, you should be rocking and rolling inside your VM! That's pretty exciting because you're currently inside a real, live webserver. [oohs] [aahs]
Because the Ubuntu, and Linux as a whole, community is huge, things are moving fast. Even though you picked the most updated version of Ubuntu because you're a huge pro, it's likely already behind the times. You'll know by this prompt at your login:
0 packages can be updated 0 updates are security updates
If you see that, you're good. If you see numbers other than zero, fix it with these simple commands:
sudo apt-get update sudo apt-get upgrade
NOTE: I just ran those commands for S's and G's anyway, despite seeing zeros, and plenty of stuff upgraded and updated, so who knows. Maybe just run them anyway.
We're so close to having our instance ready! Run this epic command:
sudo apt-get install apache2 mysql-server libapache2-mod-wsgi python-dev libmysqlclient-dev python-setuptools
root. Have it be something crazy like
mod-wsgi Is what will let Apache talk to Python. (Pro Tip: This is important) However, it's not actually activated yet, so run this command to fix that:
sudo a2enmod mod-wsgi
If that didn't work, run
sudo a2enmod wsgi. Thanks to @jack_slingerland for the pro tip.
If you see
Module wsgi already enabled then... great.
sudo easy_install virtualenv sudo easy_install pip