Why are most linux servers running CentOS?
I have been using Ubuntu for more than two years, and as I check more and more web servers I'm discovering that they are using CentOS.
Is there any particular reason why this is the case?
Solution 1:
CentOS is line-for-line the exact same code as Red Hat Enterprise Linux, except RHEL costs $$ to purchase and CentOS is free. Basically, you get one of the most widely respected enterprise-class operating systems with security updates for free, sans a support contract.
Solution 2:
While many GNU/Linux based servers do use CentOS, many still use other options, professionally I use Debian for workstations and servers. Other suitable options would be Ubuntu Server (LTS), ArchLinux, or Slackware.
One reason that my employer didn't go with CentOS, was it wasn't around then, and White Box Linux which was available appeared based on a small group of contributors. At the time Ubuntu didn't have a server edition as far as I recall, and hadn't launched their Long-Term-Support releases, so we went with the long time stable, albeit slow release process of Debian.
The major rationale behind using CentOS or Red Hat Enterprise Linux (versus Fedora Core), or Ubuntu Server LTS or Debian stable (versus Ubuntu desktop latest) has to do with release schedules, and support (updates) lifecycles.
With the deployment of a large number of systems, in particular a large number of servers where uptime and availability is of prime important, doing a major version upgrade every six months is a lot of work, particularly is you have servers co-located, or a widely dispersed (e.g. nationally across the US, Canada, and/or India) network. So one of the goals becomes maintaining support over a longer period of time, while being proactive with security updates, and trying to strike a balance in regards to supporting new devices (e.g. new CPU model, new motherboard chipset) that newer systems may be based upon. A lot of companies have taken to life-cycling enterprise hardware ~3-4 years, which matches the longest regular manufacturer & OEM's warranty term. Of course, some try to combine new hardware purchase with new OS upgrade if possible to reduce effort. Thus GNU/Linux distributions with longer support periods tend to win in usage preferences.
I believe one reason that CentOS is commonly found in the server environment, is that is work-alike to Red Hat Enterprise Linux, which many 3rd-party training courses base their Linux training upon, so system administrators are familiar with RHEL and CentOS specific configuration file layout and included configuration GUI front-ends.
I hope that answers some alternatives distributions that you will also find on servers, as well as some of the rationale behind the decision process in general.