Hello guys, Tushar here. I received lots of comments and emails about Amazone AWS. Few readers of our website asked me to write about how to create a linux server in amazon web service. We already covered how to create Windows RDP Server in our previous posts. In this article, I will guide you how to create an EC2 Instance (Amazon use EC2 as a name for VPS) with Ubuntu 16.04 operating system.
- Fully activated/verified Amazon AWS account.
- PuTTY or any other SSH client.
- A cup of coffee.
Table of Contents
- Step 1 : Prepare your account
- Step 2 : Select your VPS server location
- Step 3 : Go to EC2 Dashboard
- Step 4 : Create our First VPS
Step 1 : Prepare your account
After successful login, you will see a page like this. This page is known as AWS Management console
Step 2 : Select your VPS server location
In Amazon AWS you can launch a server in any of the fourteen locations. You should always launch a server in your targeted audience location. For example, If your website is for US visitors, you should launch the server in US East or US West regions. You can select the location from Upper Right corner of AWS console.
Step 3 : Go to EC2 Dashboard
Now we know that Amazon call VPS as a EC2 Instance. But what is mean by EC2?
EC2 stands for Elastic Compute Cloud. A virtual machine which is highly scalable in nature. Scalable means you can change the machine size anytime as per your requirements.
Click on services >> EC2 from upper left corner of AWS management console
This is EC2 Dashboard
Step 4 : Create our First VPS
Click on the Launch Instance button. AWS will display you a Wizard to create your EC2 Instance. By following this wizard you can create your server easily.
Step 4.1 : Choose an Operating System
You need to select an Operating System for your VPS. Amazon has tons of OS images known as AMI (Amazon Machine Image). In this tutorial, I will select Ubuntu 16.04 64bit OS.
Step 4.2 : Choose a Server Type
You need to choose your server specification on this page. Select the server type as per your requirement. Please see the the AWS EC2 Pricing before you select any server type. For this tutorial I will select “t2.micro” instance. Then click on the button.
Step 4.3 : Configure Instance Details
Step 4.4 : Add Storage
Now we need to add SSD storage space into our server. There is no limit for the SSD space. I recommend to choose minimum 20GB SSD space if you want to use this server for hosting website. Then click Next button.
Step 4.5 : Add Tags
We will add “Name” key and set “Instatrick.com” as a value. It will set Instatrick.com as a name for our EC2 server. This is completely optional step you can skip this step and click on Next button, but I recommend you set name for server to recognize the server easily.
Step 4.6 : Configure Security Group
Security Group is important part of EC2 instance. Security Group is like a firewall. You need to specify which ports you want to open and which ports you want to block. By default only SSH (22) port is enabled. But for website hosting we must enable HTTP (80) and HTTPS (443) ports. AWS will also allow you to enable all ports by selecting “All Traffic”. But I recommend not to use that option, it may cause security problems. Also you can open additional ports as per your requirement like FTP, SMTP, IMAP. Select “Anywhere” from Source list for each port. Then click on Next button.
Note: You can set any name for security group. It does not matter.
Step 4.7 : Review Instance Launch
The last step of our Launch Instance wizard. Just make sure you have every option is configured as per your requirement. Then click on Launch button.
Now you will see a pop-up box for SSH key. SSH key is a file which is used to connect to server. Select “Create a new key pair” option Then set a name for your key and then download key file.
Save this file in safe place. You will need it every-time you want to connect to your EC2 server. Now click “Launch instance” button.