Amazon Web Server 5 Minute Install

This tutorial will show you how to set up an Amazon cloud server n just over five minutes! It assumes you already have an Amazon account created. If you have to create an account, see my more detailed article on creating an Amazon cloud web server HERE

Here are the high end steps to create a web server from Amazon’s EC2 tab:

  1. From the EC2 tab, click “Launch Instance” near the top of the page and then click on “continue” with the default “classic wizard” selected.
  2. In the next dialog you will see, click the very first “select” button to select the basic Amazon Linux AMI.
  3. In the next dialog, you’ll be asked to select a zone. If you already have a security group created for another instance that you want to use, select the same availability zone, otherwise just click “Continue” with the default selected.
  4. The next dialog is for advanced options, just click continue to accept the defaults. Then in the next window, click continue again to accept the default root volume which will work fine.
  5. The next dialog window is for Key Value Pairs, Enter a friendly name for your server in the first value input and click “continue”.
  6. The next step allows you to choose an existing key pair or create a new one. Do so and click “continue”. Then choose a security group from a previous instance or choose the one with “default” in the name if you haven’t created one in the past. If you have custom needs, create a custom security group. Click “Continue”. Then click “Launch” and “Close” in the next two windows and your instnace has been created. It may take a minute or two to set up in the background.
  7. Loginto your instnace using the puglic IP address which you can get by checking the instance in your amazon console and making a note of the IP address. it will look something like: http://ec2-54-242-44-14.compute-1.amazonaws.com/, but you can shorten it by taking the number after the ec2 part so that the above would shorten to 54.242.44.14 which is the IP address only. Notice I replaced the dashes with periods.
  8. Open Putty and enter your server’s IP address form the last step into the host field. Click on “SSH” from options on left of Putty window then click on the “Auth” subcategory and use the browse button to allow Putty access to your key file which you should have downloaded to your desktop when creating it for the first time. If you have not done this yet, look in Amazon’s help section for instructions on downloading your key file. After selecting the key file, click on open to open it, then open again to open a terminal window and finally click yes to add a security exception and you will be connected to your instance. Enter “ec2-user” into the terminal window when it asks for a user name and hit enter.
  9. Now it’s time to install some stuff. FIrst update your server’s software by typing “sudo yum update” then when that is done, type the following series of command line commands to install PHP, MySQL and PHPmyAdmin:

sudo yum install php-mysql php php-xml php-mcrypt php-mbstring php-cli mysql httpd

sudo yum install mysql-server

sudo /etc/init.d/mysqld start

mysqladmin -u root password UrPassWord

mysql -u root –p

If you get a MySQL prompt, you are good so far. Type q to exit MySQL and continue from the command prompt as follows:

sudo vim /var/www/html/index.php

Now enter some test text for your first test webpage.

Save the page and start your new server with

sudo service httpd start

Type the IP address in a web browser and if you see your test text from above, you are done! otherwise, go back and find your error. Good Luck! If you need a more detailed set of instructions, see my first post on setting up a cloud server at http://jafty.com/blog/?p=142

.

(Also read: MangoMatter Media provides the best web hosting services. Visit their website today to know more)

 

 

Leave a Reply

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