Amazon EC2 free hosting (micro instance) for 1 year - Ubuntu + Wordpress + Asterisk

Internet
Linux
VoIP
Author

Vinh Nguyen

Published

March 16, 2011

I use old laptops as web servers at school. However, they really aren't built to be running continuously; I have disk problems on both of my old laptops. Amazon Web Services offer a free usage tier of EC2 cloud service for 1 year. After the 1 year, the micro instance cost about $.02/hr, which is still pretty cheap. I sign up for an account with Amazon Elastic Compute Cloud (EC2), started an instance, installed the ami-3e02f257 AMI, downloaded the private key, and the ball started to roll. Before you can ssh to your server, you have to set up the firewall from the management console of EC2 to open port 22 per this post. To log in and set up, I had to download the private key (PEM) that amazon generated and logged in as the user ubuntu (root is not allowed for my chosen AMI; this is the default user per the AMI):

ssh -i /path/to/amazon.pem ubuntu@permanent.dns

Once logged in, I changed the ssh configuration to allow user logins. Then, I created my user account:

## http://www.howtogeek.com/howto/ubuntu/add-a-user-on-ubuntu-server/
sudo useradd -d /home/username -m username ## create user
sudo passwd username ## set password

## http://ubuntuforums.org/showthread.php?t=162867
sudo adduser username admin

## http://linuxwave.blogspot.com/2009/03/changing-default-shell-in-ubuntu.html
sudo emacs -q -nw /etc/passwd ## change /bin/sh to /bin/bash

Now I can log in with my username, and enable passwordless ssh.

Now that Ubuntu is set up, I can install everything I want subject to the constraints of the server. Let's see how this goes…