104

I had a web server that ran Ubuntu, but the hard drive failed recently and everything was erased. I decided to try CentOS on the machine instead of Ubuntu, since it's based on Red Hat. That association meant a lot to me because Red Hat is a commercial server product and is officially supported by my server's manufacturer. However, after a few days I'm starting to miss Ubuntu. I have trouble finding some of the packages I want in the CentOS repositories, and the third-party packages I've tried have been a hassle to deal with.

My question is, what are the advantages of using CentOS as a server over Ubuntu? CentOS is ostensibly designed for this purpose, but so far I would prefer to use a desktop edition of Ubuntu over CentOS. Are there any killer features of CentOS which make it a better server OS? Is there any reason I shouldn't switch back to Ubuntu Server or Xubuntu?

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
DLH
  • 1,115
  • 2
  • 10
  • 13
  • 1
    I've added the subjective tag. Should probably be a wiki article. – John Gardeniers Aug 13 '09 at 22:22
  • 1
    What packages are you missing out on? – Ophidian Aug 13 '09 at 22:50
  • I've been trying to install a good Java servlet implementation. I've always had trouble setting up Tomcat the way I wanted it, even on Ubuntu, so I wanted to try Glassfish or Jetty. Also, I had to add a third-party repo just to get phpMyAdmin, which has always been an essential package to me. – DLH Aug 14 '09 at 12:15
  • 5
    Take a look at the EPEL repo if you're hunting for packages that aren't in the main, supported repositories. – Ophidian Dec 09 '09 at 19:21
  • 3
    xubuntu on a server? srsly? xD – The Shurrican Apr 18 '11 at 18:48

17 Answers17

173

There are no benefits that I can discern for using CentOS (or RHEL) over Ubuntu if you are equally familiar with using both OSes.

We use RHEL and CentOS heavily at work, and it's just painful -- we're building custom packages left and right because the OS doesn't come with them, and paid RedHat support is worse than useless, being chock full of "pillars of intransigence" who see it as their duty to make sure you never get to speak to anyone who can actually answer your question. (I've heard that if you spend enough money with them their support improves markedly, so if you're a fortune 500 you'll probably have better luck than we do -- but then again, if you're fortune 500 you're probably chock full of useless oxygen thieves internally anyway, so it feels natural to deal with another bunch of them)

That much-vaunted "hardware support" pretty much always comes in the form of puke-worthy binary-only drivers and utilities that I'd prefer to avoid by almost any means necessary. Just choosing hardware that has proper support to begin with is much less hassle than trying to deal with the crap utilities.

The long-term stability of the OS platform isn't a differentiating factor -- Ubuntu has LTS (long-term support) releases that are around for five years (and which are coming out more often than RHEL releases, so if you want the latest and greatest you're not waiting as long), so there's no benefit there either.

Proprietary software doesn't get much of a benefit, either -- installing Oracle on RedHat is just as much of a "genitals in the shredder" experience as installing it on Debian, and you won't get any useful help from Oracle either (proprietary software support is near-universally worthless in my long and painful experience).

The only benefit to running CentOS is if you are more comfortable working in that environment and have your processes and tools tuned that way.

womble
  • 95,029
  • 29
  • 173
  • 228
  • 61
    +1 for an opposing view and *colorful* euphemisms. "genitals in the shredder" I'll remember that one. – osij2is Aug 13 '09 at 22:29
  • 2
    Yeah, I'm definitely not comfortable working in CentOS. I'm going back to my former lover....I mean OS. – DLH Aug 14 '09 at 12:51
  • 26
    "pillars of intransigence" is the most awesome phrase I've read or heard uttered this day.... – Bob Mar 08 '10 at 21:19
  • 6
    I think you are comparing apples to oranges. ubuntu is more like fedora, and centos/redhat/oel/"whatever" is like debian with stuff that never gets updated to any decent level, but you get a chance to spend money on "support". – monomyth Sep 02 '10 at 23:25
  • My phrase de Jour is definitely going to be "genitals in the shredder". :D – Shane Nov 23 '10 at 13:40
  • +1 for the genital comment :-) – schmoopy Jun 27 '12 at 00:13
  • For a lot, its the package manager. I use both ubuntu and centos/rhel. Both can drive me crazy at times but I had better results with centos in virtualbox and I perfer yum as it does some of the manual work for you i.e. update. – radtek Aug 12 '14 at 13:36
  • It's not wonder they threat you this way. I found them very helpful when building JBoss systems. If you chase them for questions about packaging or firewall you would be always pushed back because there isn't much to understand or ask. It's simple, obvious and self-explanatory. You might still get some attention from other trolls on SO. – Andrew Smith Sep 28 '14 at 14:04
  • The question I was asking for help with wasn't simple, obvious, or self-explanatory -- and it turned out to be a security bug in Apache, which Redhat weren't particularly interested in patching, even when I provided them that patch, let alone investigating independently. If I've got to find and fix my own bugs, and then run my own locally-patched packages, what value are RedHat providing, exactly? – womble Sep 29 '14 at 01:06
42

'Enterprisey' server deployments are huge projects, with lots of inertia, and admins want to keep them running for many years with only bugfixes. Never new features without a well-rehearsed testing procedure.

For this, it's really valuable to have a slow-moving foundation. So that other big and slow-moving projects can be validated on the new version several months after release of the OS, and still you have years before it's declared obsolete.

That's what RHEL (and CentOS) provide: manufacturers can validate that it works on the hardware, big ISVs (like Oracle, for example) can test it, and then around a year after the last release of RHEL, you can use it knowing that everybody around you knows it very well. Then you install it, configure, and when it runs, it will keep running for years, without surprises. You can be (mostly) assured that when you patch it, you'll get the latest bug fixes, but not any new feature.

of course, the 'no surprises' part also implies not to update almost any part of the distribution for the whole lifetime of the release. So it's limited, and already obsolete when released (by other distro's standards).

Personally, I prefer Ubuntu's timing. It's very rare for me to have an application for more than 3-4 years without having to rebuild it (due to changing requirements), so long term stability (in the 'stagnancy' sense) isn't so crucial in most cases.

Javier
  • 9,078
  • 2
  • 23
  • 24
  • 9
    to add to that - if you want that kind of long term stability with an ubuntu-like environment rather than RHEL/CentOS then use the debian stable release (currently "lenny"). like RHEL/CentOS, no new features are ever added to debian stable, just security and other serious bug-fixes, and those fixes are back-ported to the package versions in 'stable' rather than upgrading to new versions. – cas Aug 13 '09 at 22:11
  • 3
    Good explanation of what RHEL and CentOS are trying to accomplish. I'm with you on your preference for Ubuntu's timing. I feel like the availability and ease of installation of packages is more important in my case than the long term stability. – DLH Aug 14 '09 at 12:46
  • 7
    Ubuntu LTS gets fixes backported for 5 years also. – Cian Sep 11 '09 at 09:39
18

By default, CentOS is pretty restrictive in its package selection and slow in the updates to new packages because it literally is a repackage of RHEL, and RHEL is slow and steady for reliability sake.

That being said, you have the ability to add other repositories which feature a wider selection and newer packages.

Check this link for more possibilities: http://wiki.centos.org/AdditionalResources/Repositories

I myself have used EPEL to a decent amount of success.

Matt Simmons
  • 20,218
  • 10
  • 67
  • 114
  • 2
    I prefer the Red Hat/CentOS way to Debian/Ubuntu personally but if you have a requirement for PHP 5.2 (for instance) it's easier to accomplish with a Debian distro. Of course all can be accomplished in CentOS as well by adding a repo or two or three - but sometimes you get conflicts between the old and the new. – HTTP500 Aug 13 '09 at 22:00
12

The "Killer Feature" is a near-identicalness to RedHat, which is the platform most targeted by third party vendors that offer support.

RedHat suffers from flaws in that major new features are only introduced for "major" version bumps; minor version bumps are usually bug- and security-fix only. (Firefox is the major, perhaps only, exception to this rule.) As such, it changes very slowly.

This flaw is also a feature, in that you can install an early rev of a particular stream and you know nothing important will change over the supported lifespan of the OS. So I have systems running RedHat 4 which are essentially unchanged except for security and bug fixes over the almost two years that the OS has been available.

This is, I understand, a major attraction of debian, too.

Other distros, such as Fedora, jam new features and versions of things in really fast -- but since their lifespan is so short, such distributions are therefore unsuited for use on servers. I don't want to have to rebuild everything every twelve months because my distro is now unsupported.

So if you want steady and stable, RedHat/CentOS is a good fit. If you want "new and shiny", it isn't.

David Mackintosh
  • 14,223
  • 6
  • 46
  • 77
9

Ubuntu is also released with a server edition, and you can get commercial support from Canonical.

koenigdmj
  • 1,055
  • 7
  • 12
  • I'm familiar with Ubuntu Server Edition. However, I figured CentOS must have some advantage over Ubuntu since it's based off a well-respected commercial product. However, I'm starting to question this. – DLH Aug 13 '09 at 21:01
  • 7
    Ubuntu is based off the similarly respected, though not commercial, Debian. – David Spillett Aug 13 '09 at 21:07
  • Centos's "advantage" is the association with RHEL - i.e. it's a branding advantage, not technical. for some environments (mostly large corporate and similar), a well-known name with a company behind it is essential. – cas Aug 13 '09 at 22:15
  • Craig Sanders: And CentOS disclaims all association, to the point where they refer to Red Hat as "Prominent North American Enterprise Linux Vendor". Ubuntu, on the other hand, is well known to have a connection with Canonical. Thus, there's a well-known company behind Ubuntu as well. – koenigdmj Aug 14 '09 at 01:35
  • 1
    @koenigdmj: CentOS may disclaim the association but the only reason that anyone uses CentOS is that they know it's almost exactly the same as RHEL but free. – cas Aug 14 '09 at 02:09
  • which isn't enough reason for me - i use debian - but it is exactly what some people want. – cas Aug 14 '09 at 02:11
9

what are the advantages of using CentOS as a server over Ubuntu?

I've found CentOS to support virtualisation under Xen better - I tried Ubuntu at first, but it kept crashing. I've had 10 servers running on CentOS for the past couple of years, no problems. I do use Ubuntu as the OS for virtual machines, though.

David Hicks
  • 2,258
  • 2
  • 15
  • 12
  • 2
    We run dozens of Xen VMs using Debian Lenny as the dom0; we considered CentOS but the version it ships with is rather embarrassingly old, and if you roll your own Xen you're completely on your own. That reminds me, though -- all this "CentOS/RHEL only do security updates" is bollocks, because they're sticking KVM into 5.4... nothing could possibly go wrong there... – womble Aug 14 '09 at 02:40
  • I was running Xen on Debian machines for years and it was both stable and performant. I am wondering why Ubuntu should bring less stability for Xen just because it's Ubuntu? – PythonLearner Jun 24 '12 at 15:11
  • Second this. Never had any problems with CentOS and Xen. But had issues with Ubuntu. Never used Debian so no thoughts on that. – William Fleming Aug 29 '12 at 13:46
8

I'll warn you all I'm a Linux leech, meaning that I run small consultancy and provide Linux services and support to a couple of SMEs that cannot afford proper linux support, and I'm also a freeloader in the sense that I use only free-as-both-in-beer-and-in-speech stuff and use no external support services.

That said, I've found CentOS/RH, especially after a few point releases have passed, much, much more stable and less quirky as a "setup once, and then leave be" server than Ubuntu LTS. Multiply by 5 if some "comerciall OSS" software is in the equation (think Zimbra, Alfresco and the ilk, or Kolab, anything really that doesn't use a vanilla distro guns like app servers, dbms etc by default).

If you do want "ubuntu"-ish server go Debian Stable. Actually, with Linux Mint now getting on top of its game, and being overall prettier, I can't find ANY use of vanilla Ubuntu/Kubuntu/Xubuntu, be it server or desktop, but then YMMV.

If you want easy to setup servers for those not so much in the know I'd chose ClearOS (provided that the packaged software fits your needs) over Ubuntu-anything any day. Actually, after a couple point releases the backports should do much for Ubuntu LTS as well. So I'm pretty sure that Hardy is decent-ish now. One could consider Turnkey Linux packages as a nice alternative to ClearOS, especially for virtual machines.

If you do know how to work your stuff yourself, go CentOS or DebStab, there really is no other (serious) choice. DebStab might be a better choice on whitebox hardware b/c of better drivers, whereas CentOS might be better if you need to use commercial oss software on the box and/or you're using proper server boxes.

Boky
  • 81
  • 1
  • 1
7

We develop for CentOS because it's compatible with RHEL, which is among the most commercially supported distros. When ISVs produce Linux versions of anything (apps, binary kernel drivers, etc), chances are good it'll be supported on RHEL first. For that reason alone, we stick with the most common.

EmmEff
  • 292
  • 1
  • 5
4

The only reason you might get forced into using RHEL (or CentOS) is when software providers only guarantee support if you run their product on it.

I have a case like this right now, where we have to consider to either buy product A and learn RHEL enterprise administration, or hack it up on Ubuntu and use our existing knowledge.

Alot of posters above me here seem to forget (or don't know) that Ubuntu has a LTS Server release. The only updates you'll get are fixes and security patches, nothing else. If you desperately need to install something newer from packages you can just use 3rd-party software repositories (like dotdeb for latest PHP/MySQL for LAMP servers), but it will violate any existing support contract with Ubuntu.

pauska
  • 19,532
  • 4
  • 55
  • 75
4

Linux is a kernel, not an OS distribution, so at the heart Ubuntu and Red Hat/Centos are the same OS. The difference is the layers added by the specific distribution; Red Hat is a bigger player because professionally they've been incorporated longer and are a name for enterprises. They also have commercial support and tools to enhance their offering...

So primarily they're a name that can be tossed around for pointy haired bosses that need a name to toss around because they don't know what you're talking about.

Ubuntu has support through Canonical and offers a long term support version of their product. They're just a newer (and more popular) kid on the block.

Overall it boils down to using what best fits your work habits and preferences. If you're comfortable using whichever distro, use it. You don't like some specific bit of the kernel you can still recompile it and customize it to your liking regardless of distro.

Bart Silverstrim
  • 31,092
  • 9
  • 65
  • 87
  • 2
    I think you just confused yourself with kernels and OSes. OS is what differs Ubuntu from Red Hat, not the other way around. – monomyth Sep 02 '10 at 23:28
  • 1
    The kernel is the operating system, and every distribution is running the same basic kernel under the eye candy and distribution specific utilities. Ubuntu and Red Hat are both Linux, just different distributions. The difference I was pointing out is that the companies behind the distributions is what makes a difference to businesses, and most of the big names have support contracts available. – Bart Silverstrim Sep 03 '10 at 10:08
4

I work in a relatively small shop as well. We have roughly 20 odd servers all running Ubuntu LTS - with some recent packages back-ported and hosted in a local repo. Works really well.

The only time I need to consider CentOS is when I have to deal with vendor to troubleshoot problem - the time when you need to install vendor supplied binaries - having a supported software stack gives your vendor no excuse to reject your support request because of "unsupported configuration".

Another use case could be application server setup to support a commercial software. You just don't want to fuss around to get things work simply because you prefer a distro over other.

Having said that I'm biased - I settled with Debian when I started on Linux years ago. Ubuntu is (IMO) Debian with shorter and more predictable release cycles. Never liked redhat/centos anyway...

Cian
  • 5,777
  • 1
  • 27
  • 40
Lester Cheung
  • 659
  • 4
  • 11
  • 2
    "gives your vendor no excuse to reject your support request" -- no, they just ignore it instead. – womble Aug 14 '09 at 02:41
3

Tried both and it is the same to me... There are some difference in packages, paths, etc but at the end of the day, it's still Linux Distro...

mangia
  • 589
  • 2
  • 6
2

For a single server it doesn't really matter. So just run FreeBSD :) You'll get ZFS and Dtrace.

But it matters when you deploy hundreds.

monomyth
  • 971
  • 1
  • 5
  • 9
  • I think it does. If you are already familiar with one distribution, you should stick to it although there is a huge reason speaking against it. And working yourself into a new distri just because one single server is very inefficient. – PythonLearner Jun 24 '12 at 15:12
2

Centos main advantages are:

  • Stable packages (e.g. Bind), which are very often more suitable for operation
  • SELinux fully working and implemented, which is not true for AppArmor on Ubuntu
  • Very good virtualization platform, which is not true for Ubuntu
  • High quality 3rd party packages, like EPEL, suitable for heavy duty operation
  • More stable and secure kernel than Ubuntu (check last 6 months updates)
  • Better driver support for many vendors

Simply Centos is more stable.

Andrew Smith
  • 1,123
  • 13
  • 23
  • And now Centos7 is also faster. The main concept behind Ubuntu being used in datacentres is that it's bleeding edge, but unfortunately you might have problems getting software stacks on that while Centos7 simply runs everything just fine. There isn't Python 3, Java 8, but you dont need to wait for RHEL8 but just drop it into the folder. – Andrew Smith Sep 28 '14 at 13:59
1

Example: RHEL 5's libfontconfig package has a bug in it and you cannot update the package to anything higher with yum. Thats not very stable. I ran a program on ubuntu and RHEL and it crashed on RHEL but not on Ubuntu (though it was due an improper piece of code in the application).

yan bellavance
  • 243
  • 1
  • 4
  • 12
1

For my company I use a Redhat Server... For my own purposes I run Ubuntu at home to get stuff done, or connect to said server. I also use Windows 7... So it really comes down to what you are dealing with. I use Redhat Server because it is very stable, and I rarely if ever touch it and do not plan to, it also has no GUI and is optimized for the specific hardware to serve web pages and email, not for any type of user experience.

Given the choice I would never use Redhat to work in on a day to day basis, ubuntu is the far superior IMHO desktop OS currently.

1

Ubuntu is also more uptodate than centos on mono support.

sirmak
  • 119
  • 5