These are the following steps need to create an Amazon EC2 instance.
1. login to your Amazon EC2 Dashboard
2.Click on the launch instance button
3.This will create your instance on EC2
4.There are 5 steps involved
a.)Choose an AMI
b.)Instance Details
c.)Create a Key Pair
d.)Configure Firewall
e) Review
1.Choose an AMI: For the free tier micro instance you need to select the first option ,
this is a basic 32-bit instance of Linux .
AMI
========================================================
Access Amazon EC2 instance in Windows using Putty
1.Download puttygen from
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
2.Run the puttygen executable
3.Access the EC2 instance through putty terminal
============================================================
To host a website you need to have some apache server installed and run on the EC2 instance
you will be login as ec2-user
the present working directory will be
/home/ec2-user
==========================================================
Run the command
sudo su
this command will create a super user
now yoy need to install apache:
before this you need to run tis command
-------------------------------------------------------------------------
Install Apache and PHP software
------------------------------------------------------------
1. login to your Amazon EC2 Dashboard
2.Click on the launch instance button
3.This will create your instance on EC2
4.There are 5 steps involved
a.)Choose an AMI
b.)Instance Details
c.)Create a Key Pair
d.)Configure Firewall
e) Review
1.Choose an AMI: For the free tier micro instance you need to select the first option ,
this is a basic 32-bit instance of Linux .
AMI
========================================================
Access Amazon EC2 instance in Windows using Putty
1.Download puttygen from
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
2.Run the puttygen executable
- In puttygen, click load
- Next to the File name box, select All Files
- Pick the server key pair generated and saved in previous step
- Click Save private key
3.Access the EC2 instance through putty terminal
- Download and run Putty
- Enter the EC2 instance elastic IP address
- Select Connection -> SSH -> Auth & click Browse
- Select the .ppk key just generated
- Click Open
- Login as ec2-user
============================================================
To host a website you need to have some apache server installed and run on the EC2 instance
you will be login as ec2-user
the present working directory will be
/home/ec2-user
==========================================================
Run the command
sudo su
this command will create a super user
now yoy need to install apache:
before this you need to run tis command
-------------------------------------------------------------------------
sudo yum update
---------------------------------------------
Install MySQL on Amazon EC2
sudo yum install mysql-server mysql
Install Apache and PHP software
------------------------------------------------------------
sudo yum install gcc sudo yum install httpd mod_ssl sudo yum install php
-------------------------------------
Autostart apache in AMAZON EC2
-------------------------------------------
sudo /sbin/chkconfig --levels 235 httpd on
sudo service httpd start
--------------------------------------------
==================================================
Now you have apache running on your system.
change the directory
cd /var/www
in this directory crate a html page named index.html
vi index.html
paste the following code
----------------------------------
<html>
<body>
<p>Amazon EC2 server is up and running!</p>
</body>
</html>
------------------------------------
save and exit from VI editor
------------------------------------
Before going to the public dns you should enable the http port 80 in the security group.
by adding the rule in currnt security group and choose the http and give the port to 80
---------------------------------------------------------
now go to your amazon Management console
click on your instance and get the public DNS name
paste it on your browser and your first wabpage is hosted
-----------------------------------------------------------