Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm setting up my first website on Amazon EC2, and I'm trying to decide which distro to use. I've used Redhat and CentOS in the past, but I have no bias towards any system, I just want to use whatever is best (I also have had partially-managed servers in the past, so I haven't done too much server administration until recently). The website is just a web app written in PHP and MongoDB.

I like the idea of having a lightweight OS that is described for Amazon Linux, but I worry that it could suffer in compatibility/updates compared to Ubuntu or other options that have teams focused exclusively on a server OS. Any advice?

share|improve this question

6 Answers 6

up vote 12 down vote accepted

I was in a similar situation; fully managed dedicated server, LAMP, CentOS. Then we decided to move to EC2. Also, I had very little systems or linux administration experience. I have almost zero experience with Ubuntu, so I really cannot speak to which is the so-called better OS.

I tried a bunch of pre-built AMI's with minimal OS installs from Rightscale, Alestic, Scalr and Amazon. I ended up building all my own AMI's on top of Amazon Linux, first using version 2010.11.01, now I've migrated all my custom AMI's to Amazon Linux version 2011.03.01.

The decision to go with an Amazon Linux AMI vs the other AMI providers was not an easy one. I played around with and tested different setups for close to a month before I made my final decision. In the end, since I wanted to use CentOS, it basically boiled down to one thing. I figured who better to know what hardware related dependencies needed to be included in the OS than the people who designed, built and maintain EC2. Nothing against Rightscale, Scalr or Alestic.

Six months later, even though I hit a few bumps in the road, Amazon's Linux has been quite stable. Though, I did decide to compile some of the software we use from the source (ie. php 5.3, MySQL 5.5, etc) because I ran into trouble with the pre-built packages Amazon maintained in their package repository.

share|improve this answer

If you already have some familiarity with RHEL/CentOS, I'd stick with that. There is no "best" distro for a web app server. It comes down to what tools and conventions you are most familiar with.

share|improve this answer
    
Well the point is that I'm not tied to any right now and not overly familiar with any (but I'd like to get familiar). –  James Simpson Jun 1 '11 at 1:06
1  
Then try setting up one of each and see which you like better. –  dmourati Jun 1 '11 at 1:18
4  
Amazon Linux is based on CentOS (forums.aws.amazon.com/thread.jspa?messageID=245351). So you've got a five-way race between three different flavors of RHEL (CentOS, Amazon, and RHEL itself) and two different flavors of Ubuntu (11.04 and 10.04 LTS). Anyone trying to tell you there's only one good choice amongst that list is trying to sell you something. That said, for the vast majority of server uses, I'd only seriously consider CentOS, Amazon, and Ubuntu Server 10.04 LTS, in that order. –  BMDan Jun 1 '11 at 1:26

If you want to get familiar quickly, and like installing things without much though I'd go ubuntu. Generally, on a live web server you don't want to be able to do this kind of thing! People would also argue the choice is between RedHat, CentOS and Debian. The hard core techies insist ubuntu is not fit for live server environments because not everything is fully secure and tested.

My choice would be ubuntu as it's alot less of a headache, I've used quite a few different distros for web servers, but changing firewall rules and things can be alot easier in ubuntu.

The only other thing is that ubuntu is a bit more top heavy in resource usage, so CentOS may save you a few dollars a month based on the amazon method of pricing!

share|improve this answer

Since this question was written, Amazon completely revamped for Amazon Linux AMI 2011.09, with all the bootstrapping for CloudFormation as well as Amazon tools.

Also, it includes Nginx and PHP-FPM in the yum repos if you're looking for fast and light.

Keep up with the latest releases here: http://aws.amazon.com/amazon-linux-ami/latest-release-notes/

Also keep an eye on security updates: http://aws.amazon.com/amazon-linux-ami/security-bulletins/

You'll usually have less to worry about, as the base AMI is a bare bones server with just the tools needed to bootstrap the services you actually need.

share|improve this answer

Although Ubuntu does better on these benchmarks, the tests themselves contribute towards Ubuntu winning, and the differences don’t seem to be big anyway.

I recently chose Amazon Linux largely because of automatic updates, and also because of the Ubuntu AMI bug reported by Steven and Ethan in the Quora version of this question.

share|improve this answer
    
For discussion of the aforementioned benchmarks: phoronix.com/forums/… –  Daniel Oct 11 '12 at 23:50

In your case, familiarity with CentOS/RHEL probably trumps any other considerations.

The systems I work with have largely been on the edge -- new software using new technologies and new versions. For this use Ubuntu is a better choice; I avoid building packages from source code, and Ubuntu's packages are well maintained (by no means perfect, of course) and standard repositories tend to have the stuff we need, and if not, there are repositories readily available. I tend to stay back one revision from the latest as issues tend to get worked out after a few months.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.