EC2 link

This is a Guide – How to Install CentOS 5.x or 6.x on AWS EC2. Amazon Web Services is an amazing thing. Their Free Tier Usage plan is a great place to start an average traffic website and even to experiment. AWS provides two services which can be used as VPS. One is Elastic Cloud Compute i.e. Ec2 and Other one is Virtual Private Cloud – VPC.

People mostly use EC2 for VPS for it’s high reliability and compatibility. More information on EC2 and a precaution guide to avoid charges is here.

In this post, I will show you to install CentOs on your EC2 and prepare it for VPS in next coming post. I hope you already have signed-up for the service. If you didn’t then go HERE. (you will need a Credit Card or some good bank’s VISA debit card to verify identity – hardly 50 cents will be charged). Use the same link later to login after account confirmation. There are many links and you could get lost. :-p

Let’s start.

1. After Logging. Select ‘EC2’ from list of Amazon Web Services.

EC2 link

2. If you look at your left hand side then you will see ‘Region’ and most probably you will be in ‘US East North Virginia’ region. Remember it as these are server locations. If you are running your VPS from UK then you won’t find it under US region. Change this region to most near location to you for better speeds. I have selected to run my ‘instance’ – equal to a server at ‘Asia Pacific – Singapore’.

aws ec2 region select geekact

3. Click on ‘0 Running Instance’ from Right hand to go to all in one management page. Click on ‘Launch Instance’ on that page. Alternatively you could have selected ‘Launch Instance’ from the main console page. It’s all same.

4. You will get 3 wizards. 3rd one may cost you so leave it. 2nd one is more automated but it will not make you learn anything. Go with the 1st one as this is advanced and you will have better control over your server. Click Continue.

5. Ohh my… So many things and list. Now what are all these? It’s a list of  Operating Systems Images which you can install on your server here called as AMI. The Starred ones are the ones which are specially prepared by AWS for Free Tier. There is no CentOS in this list but that doesn’t mean you can’t run it under Free Tier. Free Tier has nothing to do with region and AMI but the instance type.

6. If you want to install Generic Amazon Linux, Ubuntu or Windows you can select from 1st screen. If you still want to install CentOS then click on ‘Community AMIs’ from tab. It will search the database and then display everything.

7. Use the Search Box. I selected 32 Bit as it saves RAM and CentOS 5.7. You can search for any version. Try to stick to Type – EBS. Remember the Precaution guide. Click ‘SELECT’

aws ec2 ami os geekact

TIP: You can research various AMIs. Like which is latest and made by whom.

8. Next screen is for Instance Type. Most important screen from money point of view. Make sure that your Instance Type is ‘t1 Micro 613 MB and there is only ‘1’ in instance number. You can select zone but I prefer – No Preference. Funny!

ec2 instance type

Next screen please.

9. Next screen will show the RAM Disk ID and Kernel ID. Wait for system to populate everything and then click Continue. Yes! leave everything as it is for now.

10. On next screen check that Disk Size is not more than 10GB. Also, check for that Type is Root. Remember the precaution guide of AWS. Continue.

11. Here you can define Tags for your instance. Not much important as you will be running only 1 in Free Tier. Depends on you. Click Continue.

12. Key Pair. This will be the Key which you will use to login to your server via SSH. If you didn’t create it or lose it; you will not be able to login to server via SSH. Trust me. Click on Create Key Pair. Give it some small name without spaces. Click ‘Create and Save’. It will be downloaded to your computer. Now, select this Key Name for your instance and click Continue.

13. Security Group. This is more like a Server Firewall. Not iptables of your VPS but more than that. If you didn’t set it correct you will not be able to connect to your instance. Click on create new one and select ‘All TCP’ from drop-down. Give it a group name and save. Select it and click Continue.

Warning: What I did is opened all ports to server. If its not an experiment then you shall define proper PORT rules. Only standard ports 80 (http), 10000 (Webmin), 21 (FTP), 53 (DNS) are the least requirement to be opened on a security group as it is kind of firewall.

14. Now ‘Launch the Instance’. You will see a confirmation. Close it and you will be brought to old screen but something will be running there now.

15. After sometime everything will complete and you will see this type of message.

amazon instance status

If it is not like as above and says that check failed. Restart the instance by right click and Reboot.

16. You must check always that the EBS Volume is running fine. Check it from Volumes option on sidebar.

So, you got your first instance running on Free Tier. How about accessing it? However, first you will need to convert your downloaded key pair to a regular PuTTY (SSH client) format. That guide is here.

By Mrinal Buddekar

Data Manager and a technology enthusiast! Mrinal Buddekar is Pune based blogger who loves building server, websites, technology, and affiliate blogging.

Hey there!

Help us reach out to awesome people lie you out there. We publish Tech and WordPress, Deals, and Reviews. WE DON'T SPAM!

Your Information will never be shared with any third party