Page tree
Skip to end of metadata
Go to start of metadata

Introduction

Describes how to create a Ubuntu Linux virtual machine on the Amazon Cloud.

Prerequisite

Sign-up for the Free Tier account on AWS. The account is free for 12 months and allows for limited usage.
Unfortunately, it requires credit card information. Be careful not to exceed the usage and to disable all services before the 12 month period is up as you will be charged

Setup

  1. Sign-in to the AWS Management Console and select EC2 (Elastic Compute Cloud)
  2. Click on Launch Instance
  3. Select the Ubuntu image (Ubuntu Server 14.04 LTS). It should also say "Free tier eligible".
  4. On the Instance Type screen, select the "Free tier eligible" option
  5. Click Review and Launch
  6. IMPORTANT: A prompt will pop up to create a key pair. This will generate a private key file that is required to login to your server. You will not be able to download this file again in the future.
  7. Enter a key pair name (i.e. UbuntuTestKey) and click Download Key Pair
  8. Save the file (.pem file) to a safe location
  9. Click Launch Instances to create the server. The Launch Status page will display the status.
  10. The server instance will be created. It can be viewed in the Management Console under Instances.

Login

By default, port 22 will be open and SSH is available.

On a Unix machine, the instructions are:

  1. Open up a terminal and go to the location where the .pem file is saved
  2. Change the permission of the file to 400 

    chmod 400 UbuntuTestKey.pem

  3. Connect to the server. The server DNS name (in the example below it is ec2-52-36-57-96.us-west-2.compute.amazonaws.com) can be found under Instances - "Public DNS". Alternatively, you can use the Public IP.
    ssh -i "UbuntuTestKey.pem" ubuntu@ec2-52-36-57-96.us-west-2.compute.amazonaws.com

Elastic IP

Every time the server instance is restarted, it's IP and DNS name is changed. To avoid that, you can create an Elastic IP, which will provide a static IP (and DNS name) that can be associated to the server instance.

  1. In the Management Console, go to Network & Security - Elastic IPs
  2. Click on Actions - Allocation New Address. Confirm the creation on the prompt.
  3. The new Elastic IP will appear. Right click and select Associate Address.
  4. A form will pop up. Click on the Instances textbox and the server instance will be listed. One selected, click on Associate.
  5. The server instance is now associated to the Elastic IP.  



  • No labels