Unlike most other desktop and server operating systems, Linux comes in a wide variety of flavors, each based on a common core of the Linux kernel and various GNU user space utilities. If you're running Linux servers -- or Linux desktops, for that matter -- you should understand the important differences and be discerning about which flavor of Linux is best suited to any given situation. This article will help you do just that.
Because Linux is open source software, the number of discrete Linux distributions is hard to know for sure. But a short list of major distributions account for the lion's share of commercial Linux deployments: Red Hat Enterprise Linux (RHEL), CentOS, Fedora, Ubuntu, Debian, and OpenSuse.
Style and substance
Most of the differences among these distributions are cosmetic. They concern details of their configuration and implementation rather than core functionality. File system layouts, configuration settings, update mechanisms, and bundled configuration tools may vary, but the similarities far outweigh the differences.
Even so, there are clear delineations among them, mostly in the area of system design. When it comes to managing Linux in a production environment, you will find important differences in everything from stability to support for popular open source packages. Failing to appreciate these nuances can mean the difference between smooth sailing and choppy waters when it comes to deploying and running your application.
Take the Web server, for example. All Linux distributions bundle the Apache Web server, but each implements Apache using slightly different file system layouts and configuration conventions.
For instance, Ubuntu calls Apache version 2 "apache2", while CentOS and RHEL call it "httpd". That affects where configuration files for Apache are located within each distribution. You can find them in .../etc/httpd on CentOS and Red Hat, but .../etc/apache2 in Ubuntu. Furthermore, Ubuntu and similar distributions might place the Apache document root in .../var/www, while CentOS and RHEL opt to put it in .../var/www/html.
Further, Ubuntu offers a homegrown Apache configuration management scheme that allows an admin to place Apache configuration snippets in /etc/apache2/sites-available and /etc/apache2/sites-enabled, and manage them with custom commands such as a2ensite and a2dissite that move those snippets around and reload Apache. This means you can enable and disable virtual websites from the command line. CentOS/RHEL don't have anything like this, requiring manual management of the configuration files.
Ubuntu's approach isn't necessarily better or worse -- it's a matter of personal preference. On one hand, it does make operations like setting up a website easier. On the other hand, you need to prepare your configurations in such a way to work with customized configuration commands. Purist Apache admins would probably simply work with the files directly. Newer users may find Ubuntu's approach helpful. Ultimately, it's up to you to decide which is preferable.
There are other differences. By default, Ubuntu locks down the root user, instead requiring that a local user be created during installation; that user is then granted sudo privileges in order to perform tasks as the root user. CentOS/RHEL have no such restriction and allow for general access by the root user.
Some distributions also have customized configuration tools. Suse Linux (and OpenSuse) sport YaST (Yet another Setup Tool), a system setup and configuration manager that isn't used in other Linux distributions.
The devil is in the daemon
In other cases, there may be broad similarities among current distributions that aren't shared by older versions. For example, systemd has been introduced as a replacement for sysvinit in recent releases of the major Linux distributions, fundamentally changing the way servers running these distributions boot, load, and manage services (and not without controversy). Older releases of these distributions will not have systemd, and thus will not benefit from the greater efficiency and performance improvements that it brings. That may be a factor worth considering if you're presented with a choice of release versions.
Another key element that differentiates Linux distributions is the package update mechanism and the frequency of package updates. On Ubuntu and Debian, you use Apt (Advanced Package Tool) to handle distribution updates. This tool allows you to update individual packages or the system as a whole. On RHEL, CentOS, Fedora, and others, Yum (Yellowdog Updater, Modified) is the package manager. Apt and Yum operate in similar ways, letting admins configure custom package repositories, and easily upgrade packages and maintain the system.
Generally speaking, the major Linux distributions align as described in the table below.
Making the right choice
The choice of which distribution to use typically reduces to a few key elements:
Familiarity. The advantages of sticking with a Linux distribution you're extremely familiar with will generally outweigh the advantages of adopting a different distribution. If CentOS and RHEL are what you know, sticking with these distributions will likely be easiest in the long run. Unless server requirements dictate otherwise, go with what you know.
Simplicity. There is a lot to be said for homogeneity in application stacks. Maintaining the same distribution across your stack is almost always the way to proceed. If your application servers run CentOS, then your database servers should too, unless there is an overriding reason to go a different direction for those servers.
Server requirements. Ultimately, your choice of distro will be limited by the applications and services you need to deploy. For example, if the server must run the very latest releases of a common package like MySQL or PHP, choosing a stabler distribution like CentOS or RHEL with a longer release schedule will complicate matters. You will likely need to resort to additional, third-party package repositories and use packages built by a variety of contributors rather than the official releases supported by the distribution. In some cases, you may have to create your own package RPMs or custom package compilations for very recent package releases.
Alternatively, a little research may show that Fedora already has the version of MySQL or PHP you need, so using Fedora will save you valuable time and effort. In other cases, Ubuntu or Debian might more closely match the software requirements of your server, and thus will be worth considering even if you are not as familiar with them.
You may also find that your planned application or service stack comes with suggestions or recommendations on which distribution is a best fit. In addition, you could find some solutions have prebuilt packages for a few Linux distributions. Your best bet will be to stick with those versions to ensure compatibility.
Stability. Finally, it pays to be conservative. Relying on stable OS releases should always be the default approach. If a stable version doesn't meet the server software requirements, then moving out to a more recent release may make more sense than adapting the older, more stable release with more recent packages.
Rarely should a production server be run on unstable or testing releases from any vendor. Some administrators interpret this guidance to mean that Fedora and non-LTS versions of Ubuntu should never be run on production servers. While that is a good rule in general, there are always exceptions. Understand the risks involved, and be prepared to encounter the hidden issues that usually crop up when dealing with unstable or testing releases.
In many cases, the choice of Linux distro isn't entirely up to you. If you're shopping for a VPS (virtual private server) or cloud server instance, or even for a dedicated server at a hosting facility, you will find that providers offer a limited set of supported distributions to choose from. For the vast majority of those providers, those supported distros will be a subset of RHEL, CentOS, Fedora, Ubuntu, Debian, and OpenSuse.
It's not uncommon to find providers that offer only CentOS and Ubuntu, or perhaps those distros along with Fedora and Debian. Fewer will offer OpenSuse, so predominately the choice comes down to these four or five distributions. The guidelines above, and the table below, should help you figure out which is best for your project.
Of course, your best course is to get comfortable with as many different Linux distros as you can, so you're prepared to use each when its strengths are a match for the job at hand.