Social Networks

Amazon EC2 cloud Integration

Amazon Elastic Compute Cloud (Amazon EC2)

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale computing easier for developers.

In this post 9lession exmplained how to setup instance, elastic IP configuration, cloud instant accessing from local computer using Putty and FTP connection. It’s awesome real cloud computing, you have complete control on server, using this we can implement new web features like node.js. Soom I’m hosting all of my demos into EC2.

Amazon Cloud Installation

 

Getting started with Amazon Elastic Compute Cloud(EC2)
Amazon providing 720 hours free tier micro instance box. Very first you have to create an account in Amazon.com with valid credit card and then activate micro free tie. Click here to access Amazon console dashboard.

AWS Management Console

Step 1
Go to left panel EC2 Dashboard -> NETWORK & SECURITY -> Key Pairs

Key Pairs

Creating Key Pair – Authentication

Most important part in this installation process. Click Create Key Pair button.
Step 2

Key Pair - Authentication

Step 3
Give some key pair name.  Eg:(somename)

 

Create Key Pairs

Step 4
(somename) key pair has been created.

Create Key Pair

Step 5
You will get download save alert, save the .pem signature file into local directory Eg:D:/.

Alert

Step 6
Amazon EC2 dashboard will show created Key Pair and Fingerprint.

Fingerprint

Security Groups -> Firewall

Step 7
By default Amazon providing default security group, I recommend use the default firewall or you can create new security group like eg: Egglabs.

Firewall

Default firewall allowed ports.

Firewall

Step 8
If you want you can allow new port by adding here

Firewall

Instance -> Cloud Box

Step 9
Create instance here EC2 Dashboard -> INSTANCES -> Instances

My Instance

Step 10
Here you have to choose cloud server OPERATING SYSTEM.

operating System

Step 11
You can search in Community AMIs. Start icon references to free tier for Micro box users.

Instance Wizard

Your choice, here Ubuntu Natty Operating System 11.04 server selected.

os selection

Step 12
Instant details you can give any name.

Instance Details

Step 13
Now you have to choose type of instance small,medium and large. Amazon providing Micro (Free tier) 30 days

Micro EC2

Step 14
Here you have to select (somename) key pair by selecting Your Existing Key Pairs

Request Instance Wizard

Step 15
Configure firewall choose default security group.

Request Instance Wizard 2

Step 16
Now you instance cloud compute ready.

Request Instance Wizard 3

Step 17
Go to Amazon EC2 dashboard, here you can seen instance box running. You can  edit the instance box name.Eg:(somename)Box

Box

Step 18
Right click on the running instance and click connect.

connect

 

You will get connecting help alert.

connect help

 

Elastic IP

Amazon EC2 instance only providing public DNS name, If you reboot existing instance box the public DNS name will change, using Elastic IP we can solve this problem DNS problem it’s static.

Step 1
Clicking on Allocate New Address, amazon will provide you dedicated IP address.

Elastic IP 1

Step 2
Choose EC2.

Elastic IP 2

 

Step 3
Amazon generated an IP address, now map IP address to Instance box (Eg:SomenameBox). While clicking on Associate Address button.

Elastic IP 3

 

Step 4
Associate instance and click YES button.

Elastic IP 4

 

Linux connect

Executing following command in Linux terminal you can directly access your box.

ssh -i KEY File username@publicDNSname.amazonaws.com 
ssh -i 9lessons.pem ubuntu@publicDNSname.amazonaws.com

 

Windows connect using Putty

PuTTY is a free and open source terminal emulator application which can act as a client for the SSH, Telnet, rlogin, and raw TCP computing protocols and as a serial console client.

Step 1
First you have to download Putty.exe and PuttyGen.ext into your PC click here and download

ec2 connect 1

Step 2
Run PuttyGen.exe click Conversions -> Import Key.

ec2 connect  2

Step 3
Choose 9lessons.pem the Key Pair.

ec2 connect  3

 

Step 4
In Parameters select Type of Key Generate SSH-1(RSA). Click Save private key.

ec2 connect 4

Same directory Puttygen will generate .ppk file (private key).

ec2 connect 5

 

Step 5
Now run Putty.exe host name give Elastic IP or Public DNS name(If no elastic IP) and choose connection type SSH

ec2 connect 6

Step 7
Instance cloud connected successfully.

ec2 connect 8

Execute following commands.

Update the Package

sudo apt-get update

Install Apache2

sudo apt-get install apache2

Install PHP5

sudo apt-get install php5 
sudo apt-get install libapache2-mod-php5

Install MySQL

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

Install PhpMyAdmin

sudo apt-get install phpmyadmin

Restart Apache2

sudo /etc/init.d/apache2 restart

Now your web services is ready. You can upload your files into /var/www/ directory using FTP.

Access http://ElasticIP/. It works!

 

FileZilla – File Uploads

Using the open source FTP tool you can upload files into Amazon EC2 instance box.Download here and install into your PC.

Step 1
Select File-> Site Manager

FileZilla 1

Step 2

Give host name as your instance box Elastic IP and select Server Type SFTP-SSH File Transfer Protocol. Click OK not Connect

FileZilla 2

Step 3
Adding private key for instance cloud authentication. Edit -> Settings -> Connectin ->SFTP click Add keyfile button to browsed and choose existing .ppk file. Eg:somename.ppk

FileZilla 3

 

FileZilla 4

Step 4
Now Got File-> Site Manager click Connect button.

FileZilla 5

Instance connected.

FileZilla 6

Now you can upload files from local PC to Amazon EC2 Instance Cloud /var/www/ directory.

FileZilla 7

 

Hope you like it. Thanks!

Reference – http://www.9lessons.info/2011/09/amazon-ec2-cloud-installation.html

None found.
  1. download minecraft says:

    Have you ever considered about adding a little bit more than
    just your articles? I mean, what you say is fundamental and everything.
    However think of if you added some great visuals
    or videos to give your posts more, “pop”! Your content is
    excellent but with pics and clips, this website
    could undeniably be one of the most beneficial in its niche.
    Good blog!

  2. mobile design says:

    Hi there! I just wanted to ask if you ever have any
    trouble with hackers? My last blog (wordpress) was hacked and I ended up losing a few months of
    hard work due to no backup. Do you have any solutions to prevent hackers?

Leave a Reply

Your email address will not be published. Required fields are marked *

Allowed Tags:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>