Set Up a Cloud Webserver on Amazon

Below are the steps to set up a cloud Webserver

  1. Set up an account on AWS. To get started, you will need an Amazon acount. You can find how to create your account here. You will need to enter a credit card, but it won’t be charged as we will only be using a server that is on the free usage tier.
  2. Once you log in to the AWS Console (It’s a link under the dropdown in the top right), go to the EC2 tab and launch a new Instance. An instance is a cloud computer, which is a virtual machin. Clicking this option starts the process for choosing options of your cloud computer.
  3. Create an Instance. Select your instance Type. You can select Windows and Linux instance types. I’m going to use Ubuntu. Alos, you can use Community AMIs.

  4. Ensure number of instances is set to 1 and type is set to Micro (so it’s free) . The availability zone doesn’t really matter here so select no preference on that dropdown and hit continue. On the next page, all of the defaults are fine, so we just hit continue again.
  5. Generate and download a key pair. This step is essential to securely access your cloud computer. In this step, you generate a special file, which is a .pem file, that you’ll use to authenticate and log into your machine. Make sure your browser allows for file downloads before you proceed through this step. You’ll need to keep this file handy to connect to your cloud computer.
  6. Configure the Firewall for your cloud computer. In this step, you’ll specify the ports that will be open on your server. For a LAMP server, the default firewall configuration is to open ports for SSH, HTTP, and MySQL, which opens ports 22, 80, and 3306.

    Upon completing these steps, simply click Launch. When you do so, Amazon will build your cloud computer and turn it on. It took just over a minute for Amazon to generate my virtual machine and boot my server.

  7. Next you will get a screen showing everything you’ve just selected – as long as nothing looks particularly odd you can click “Launch” and your new server will be up and running within a minute or so! The EC2 Dashboard shows my running instance below.

  8. Now it is time to connect to the machine. You can download the private SSH key from your Amazon account. If you want to connect to the machine from Windows using the popular tool Putty, you will need to convert your private key to the .PPK format.

    On Linux, you can open a Terminal and run the following command:
    ssh -i /path/to/your/private/key.pem

    Now its time to install the LAMP stack Apache, MySQL and PHP. Here is the link to install LAMP in Ubuntu.

That’s all. Let me know if anybody has any concerns or issues.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s