Tuesday, November 9, 2010

Amazon EC2

Steps for setting up a free ec2 micro account:
  • Sign up for a free ec2 account
    • You will need to create a new AWS account if you already have one
  • Log into the AWS Management Console
  • Create a micro Linux account - choose an EBS backed AMI (Official Ubuntu AMI's are uploaded by user 099720109477)
  • Make sure security group has SSH access
  • Download pem file (can store in same directory or ~/.ssh/identity - ~/.ssh/id_dsa for newer ssh versions)
  • chmod 400 [KEY].pem
  • From folder of pem file connect with: ssh -i [KEY].pem ec2-user@[ID].compute-1.amazonaws.com (user name may be root or ubuntu, depending on instance)
  • Send files with: scp -i [KEY].pem file [USER]@[ID].compute-1.amazonaws.com:
  • Mount filesystem: sshfs [USER]@[ID].compute-1.amazonaws.com: ~/mnt -o IdentityFile=[KEY].pem
  • Unmount: fusermount -u ~/mnt

Format harddrive

ls -l /dev/disk/by-id/

Look for required harddrive

sudo mkfs.ext3 /dev/sdb1 -L "Buffalo"