Quick start on Amazon AWS.
How exciting! Amazon has started to offer free tier 1 year account to their AWS services. So why not try the services out with a small project or a new web app?
The Ubuntu EC2 starter guide gives you some hints and tips to using Ubuntu’s official images on Amazon EC2.
To summarize:
1. Create your account on Amazon, if you don’t have one already. Go to http://aws.amazon.com, and select Sign-up Now. Sign in to your existing Amazon account or create a new one. Go to http://aws.amazon.com/ec2, and select “Sign Up for Amazon EC2”.
2. After signing up, you should end up at the EC2 console. Create a key pair and download the private key.
3. Click Key Pairs under Networking and Security in the Navigation pane and then click the Create Key Pair button (save it in e.g. ~/.ec2/ec2.pem). This private key is for making SSH connections to newly created instances.
You will also need to set up your Amazon API credentials. Go to Account->Security Credentials
Click X.509 Certificates tab -> Create a new Certificate
Download the private key and the certificate (save them in e.g. ~/.ec2/cert-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem and ~/.ec2/pk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem).
Make your credential files private: chmod go-rwx ~/.ec2/*.pem
4. SSH to your instance:
ssh -i ec2.pem ubuntu@ec2-54-47-71-42.compute-1.amazonaws.com
Now you are ready to play with your instance a little bit. So we will install ruby:
sudo apt-get install curl git-core ruby
This was to grab the basic dependencies. Then we can install RVM as per the instructions on: http://rvm.beginrescueend.com/rvm/install/.
Should you have some issues with rvm, please remember, also as a general practice to:
sudo apt-get update
sudo apt-get install build-essential
A complete guide on getting started with ruby on rails on Ubuntu is available here.
Also if you’re installing Passenger (aka: mod_rails) and you hit the following error at the stage in which you run passenger-install-apache2-module:
sudo: passenger-install-apache2-module: command not found
it means is that you don’t have the gems bin directory in your PATH so do this instead:
sudo /var/lib/gems/1.8/bin/passenger-install-apache2-module
I hope you have fun with your free Amazon instance :)