Amazon EC2 cloud Integration
Amazon Elastic Compute Cloud (Amazon EC2)
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.
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.
Go to left panel EC2 Dashboard -> NETWORK & SECURITY -> Key Pairs
Creating Key Pair – Authentication
Most important part in this installation process. Click Create Key Pair button.
Give some key pair name. Eg:(somename)
(somename) key pair has been created.
You will get download save alert, save the .pem signature file into local directory Eg:D:/.
Amazon EC2 dashboard will show created Key Pair and Fingerprint.
Security Groups -> Firewall
By default Amazon providing default security group, I recommend use the default firewall or you can create new security group like eg: Egglabs.
Default firewall allowed ports.
If you want you can allow new port by adding here
Instance -> Cloud Box
Create instance here EC2 Dashboard -> INSTANCES -> Instances
Here you have to choose cloud server OPERATING SYSTEM.
You can search in Community AMIs. Start icon references to free tier for Micro box users.
Your choice, here Ubuntu Natty Operating System 11.04 server selected.
Instant details you can give any name.
Now you have to choose type of instance small,medium and large. Amazon providing Micro (Free tier) 30 days
Here you have to select (somename) key pair by selecting Your Existing Key Pairs
Configure firewall choose default security group.
Now you instance cloud compute ready.
Go to Amazon EC2 dashboard, here you can seen instance box running. You can edit the instance box name.Eg:(somename)Box
Right click on the running instance and click connect.
You will get connecting help alert.
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.
Clicking on Allocate New Address, amazon will provide you dedicated IP address.
Amazon generated an IP address, now map IP address to Instance box (Eg:SomenameBox). While clicking on Associate Address button.
Associate instance and click YES button.
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.
First you have to download Putty.exe and PuttyGen.ext into your PC click here and download
Run PuttyGen.exe click Conversions -> Import Key.
Choose 9lessons.pem the Key Pair.
In Parameters select Type of Key Generate SSH-1(RSA). Click Save private key.
Same directory Puttygen will generate .ppk file (private key).
Now run Putty.exe host name give Elastic IP or Public DNS name(If no elastic IP) and choose connection type SSH
Instance cloud connected successfully.
Execute following commands.
Update the Package
sudo apt-get update
sudo apt-get install apache2
sudo apt-get install php5 sudo apt-get install libapache2-mod-php5
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
sudo apt-get install phpmyadmin
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.
Select File-> Site Manager
Give host name as your instance box Elastic IP and select Server Type SFTP-SSH File Transfer Protocol. Click OK not Connect
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
Now Got File-> Site Manager click Connect button.
Now you can upload files from local PC to Amazon EC2 Instance Cloud /var/www/ directory.
Hope you like it. Thanks!
Reference – http://www.9lessons.info/2011/09/amazon-ec2-cloud-installation.htmlNone found.