Apr 13 2008
About Linux Distros: Ubuntu and CentOS
A few weeks ago, we setup a new production LAMP server to host a few of our client’s sites, medium size eCommerce websites. I wanted to share our experience as we came across the three big (and free) Linux distributions while we evaluated and setup the machines. We have previously setup Ubuntu Server 7.04 for our development and staging environment while researching the related family of North American Linux distributions: RedHat, Fedora and CentOS.
I’ll start with the positive: in the last few years Linux distributions in general have become main stream OS and most of the installation process is user friendly. Almost each distro offers the ’server’ edition of the OS which comes mostly configured with what a production LAMP server needs to have installed already. The installation packages are clearly labeled for i386 or x64 bit, and most even offer a net install which in CentOS case only requires downloading about 7MB of ISO file and the rest is done on the fly.
Now, let’s delve into the differences that affected our decisions, labeled according to key points and in order of importance to us:
Setup Efficiency: ROI and Learning Curve
I had the experience for setting up both Ubuntu server and CentOS server editions on two different machines. Both machines had similar configurations of two 500GB harddrives mirrored in hardware Raid1 with a 3ware card, and Intel Pro dual NIC. The rest of the hardware setup is pretty much the standard Intel based processors. Both Ubuntu and CentOS had no problem in recognizing all the hardware on the machines and the setup process went pretty smoothly. The differences began showing after the initial setup: while CentOS shows an additional very helpful setup (NIC assignments, firewall, and services setup) Ubuntu had no such thing and showed the login prompt right after boot. What I found surprising is that Ubuntu required additional steps in order to download and install SSH using aptitude - if one chooses a server edition, shouldn’t it be setup for you by default?
Although aptitude is a great package management software, I have found that the server version of Ubuntu is just not mature enough or simply chooses the minimalistic approach which doesn’t fit my understanding of a server distro. Many of the tasks that were performed by CentOS by default or had options for that during the install were missing in Ubuntu. At the end of the day, setting up Ubuntu took days while CentOS took hours. Did I say ROI? CentOS is the clear winner.
Package Management Systems
Ubuntu prides itself on apt-get and aptitude which builds itself on top of the debian package management system while CentOS, Fedora and RedHat, use the rpm and yum package management systems. After using all systems I can clearly say that I favor the yum and rpm package management systems.
First, with apt-get/apt-cache/aptitude I had to constantly refer back to the documentation on Ubuntu’s site and I still cannot remember which one do I use for searching, installing, upgrading, describing, or removing packages - do we really need the separation? With both yum and rpm simply provide a separate option and you are good to go, all the information is flowing into the terminal and it took me only one glance of ‘man yum’ to understand what and where.
Second, in the particular case of apache, vhosts, and extensinos, aptitude allows flexibility at the price of re-arranging the apache.conf and vhosts.conf into a collection of files and folders. Yum does a similar thing as well, however I still found yum’s method to keep the original httpd.conf mostly intact which allowed my familiarity with the basic apache configuration skill to take over and finalize install in no time. In my opinion, the deviation from the standard has no benefit whatsoever. The price of flexibility comes over familiarity but yet yum had the upper hand and ease of use.
Third, setting up a package that requires dependencies is equally good in both systems: they both do a very good job of finding the dependencies, looking their download sources, installing and setting it all up. However, I did find that yum had the best reporting system and after it gathered all the information it showed a useful status report while asking permission to proceed - this is valuable for sys admins and it does save time. Once more, yum feels like a more mature package management system.
Production OS? Stability vs Cutting Edge
Here is where I wanted to introduce a bit of the feeling we all shared after setting it up, plus the feeling of some colleagues of mine who I consider to be Linux Admin Gurus. At the end of the day, when all is setup and configured, the feeling from the CentOS system was much more secure and I knew exactly what is installed and what is not. Conversely, Ubuntu server did not give me that worm fuzzy feeling that ‘all is good’ and if I needed to make a change, I would have to refer to documentation first before I touch the server.
When I ask some Linux Guru colleages who manage production linux clusters on a regular basis, they all point to CentOS or RedHat due to stability and performance record. In other words, you won’t get the latest cutting edge packages like Ubuntu or Fedora - but it is guaranteed to be much less flawed.
Conclusion
The bottom line is that distro preference is a personal decision. Personal to the individual who administers the systems and personal to the organization. We’ve chosen CentOS over Ubuntu, Fedora, and RedHat. The only option I see that might change is adopting RedHat due to the technical support that is offered for a fee. Hands down, CentOS provided the fastest configuration time, lowest learning curve, better ROI, superior package management system, and a good fuzzy feeling of stability. Thanks to CentOS, we can get back to our main passion: Web Development…













Just from quickly reading your blog, it seems you are more familiar and comfortable with Yum and Red Hat’s way of doing things.
It would probably be more interesting to see this type of comparison being done with 2 people; one more familiar with Red Hat and RPMs/Yum and another more familiar with Debian/Ubuntu and APT-GET.
I acutally just installed CentOS (4.3) on my server and agree that it was pretty easy to set it up and get going.
Your review is a bit biased, with Ubuntu you can manage all your packages using only aptitude (and dpkg for installing .deb files).
Installing a LAMP server + SSH server can be accomplished simply by:
sudo tasksel
and marking these:
[x] LAMP server
[x] OpenSSH server
Done!
If you think yum is better than aptitude then wait and see, in the meantime you should read this: https://www.redhat.com/archives/fedora-devel-list/2007-February/msg01006.html
I spent many fruitless hours trying to set up Ubuntu as a Xen host, but switched to CentOS 5.1 and it worked immediately. I agree with all your comments about it.
But my biggest gripe with RedHat/CentOS is that so many web applications are beginning to require PHP 5.2 as a minimum, and even the upcoming RHEL 5.2 is not going to support this version of PHP. As a result I have just reluctantly switched to Ubuntu on one of my servers.
I have tried both, Ubuntu and CentOS as a LAMP server and I also prefer CentOS. While I do require latest PHP and MySql on my LAMP server, I find it far more convenient to just install PHP from sources, and MySql from their binary packages, than try to figure out how to configure Apache in Ubuntu.
In both environments however, webmin does make the configurations easier.
One must remember that one way to make a Linux installation more secure is by only installing the packages that one needs. Ubuntu (from my experience) only installs what needs to be there, almost like a blank slate, a foundation if you will. Just because one person is setting up a LAMP server and needs SSH does not mean that all LAMP servers will need SSH, so why install it by default? Wouldn’t it be a bigger pain to install and LAMP server and then have to uninstall SSH? I think it would!
When installing Ubuntu server it asks what servers (services) you’d like to install. I have not had any problems installing or using Ubuntu server. I wouldn’t call myself a “guru” but installing, removing, or updating software using apt is not a difficult task by any means, and I have had much more success with the apt package manager than I have ever had with yum.
Ubuntu may not be perfect, but what distro is? It all depends on what the individual (or business) needs out of their OS.
That’s just my two cents.
Experts having 5+ years experience in Debian (ancestor of Ubuntu) usually prefer apt-get and apt-cache. That’s why You can find these in manuals and todos. However, it’s quite safe to write aptitude instead (due to its backward compatibility).
The difference between apt-get and apt-cache:
- Using apt-cache doesn’t modify the system, just provides information (can be executed without being root in most cases).
- On the other hand, apt-get modifies the system, requiring sudo with a few exceptions.
By the way, Ubuntu is a desktop OS. They do have a server version, and it’s called Debian.
Robert: I have yet to see a Linux server that is managed without SSH. When I say server I typically assume 1u-4u servers that you put in hosting environments.
Nyos: Ubuntu is a Desktop OS but they actually have a server version of their OS. They have a whole team of people dedicated to the Server OS which I met some of them last time I visited the Linux World Expo.
Drew: my article is based on my experiences with the different Linux distros we’ve tried here. When we began working we chose Ubuntu due to all the ‘hype’ around it. We very quickly learned that Ubuntu is a great distro but not for the Server environment because of the above reasons. Currently, I admit that I am biased - based on experience.
Thanks for the great feedback!
Hi,
I think you should have installed the 6.06 LTS Server version rather than the 7.04 one.
I work in the Mobile Entertainment industry and we use a Ubuntu 6.06. server as one of our main texting gateways to our local telcos.
I have not seen any issues with it. We also have several Centos 4.x and 5.x servers and I can say that for the one Ubuntu server, I have NEVER had any issues with updates and stability. I cannot honestly say the same for my other Centos servers. From time to time I get timed outs and checksum issues.
Having said that I honestly feel that Centos is a very good OS for the server platform.
I run CentOS and use Ubuntu at work.
I can honestly say aside from the obvious - neither are “bad” distros.
I learned on RHEL, chose CentOS for my web server due to the similarities of what I was familiar with.
Once I began working with Ubuntu due to a job change, everything seemed to come naturally to me. However, I had also worked in a multi-platform server environment for several years.
I have no problems with my CentOS and have been running it for a couple years now.
The Ubuntu servers I would probably like better if my workplace had actually kept on top of OS refreshes - I think their production distro is Hoary - but I’m working on moving them out of that.
I prefer CentOS overall, however, I do like the rename functionality in Ubuntu.
CentOS is much easier for me to secure because of it being so similar to RHEL. I know where everything is.
With Ubuntu, I’ve had to scout the FS and learn it’s naming conventions, as well as all the little extras that don’t seem to serve a function, overall the FS doesn’t feel quite as intuitive.
For instance - hosts and hostname? why?
Most of the time you can research updates and find out what their impact is on the OS before actually implementing them.
Sometimes you can save yourself a lot of time by being pro-active.