How to choose the right Linux distribution for your cloud server

Contents

Linux exists in a complex open source environment, with many distributions (distros) developed by programmers everywhere and, at the same time, backed by big companies. What distribution should you install on your new server?

What is the difference between all these distributions?

When you run Linux on a cloud server, you are likely accessing it via SSH and not a GUI, so differences in desktop environment don't matter much (if they do). Although you can technically run any version of Linux on a server, it is better to select a distribution optimized for server use.

Most distributions will vary depending on the software they have pre-installed and its location on the “family tree” de Linux. Almost all Linux distributions are open source, so many distributions will be based on other. As an example, Ubuntu is based on Debian and many distributions focus on Ubuntu. Red Hat Enterprise Linux forked and became CentOS, con Red Hat (the company) supporting CentOS development. Amazon forked CentOS to launch its own distribution. Each of these distributions will install equivalent software, even though the exact version numbers will vary from one distribution to another.

In practice, most distros intended for the server will be relatively similar. After all, everything is linux, so as long as you are not using a dark distribution, the software you want to run is likely compiled for your system, or just be compatible anyway. The biggest problem is that the folder structure is different on certain distributions., even when it is possible that you also have to get used to the idiosyncrasies of the distribution, like Ubuntu using the apt package manager, while RHEL, CentOS and Amazon Linux use yum.

One way to completely fix this problem is to use a containerization service like Docker. Docker packages your applications in containers, which run the same way regardless of the operating system they are running on (assuming the distribution has a compiled Docker binary). You can even “emulate” other distributions; as an example, you could have a server on Ubuntu running a containerized app that think is running on CentOS. This is because Docker only modifies the container namespaces and everything runs on the same Linux kernel under the hood. You can change that server to a different provider running Fedora and all you would have to do to get your application running again would be to copy and run your application container on the new system.

Ubuntu Server LTS

Ubuntu

Ubuntu is perhaps the most popular Linux distribution. It is free and open source, so almost all cloud providers will offer it as an option, if not the default yet. If you switch to a new provider in the future, the transition should be seamless.

Ubuntu Server is a very general purpose distribution. If you don't mind delving into all the details of the competitor's distributions, you will have no problem just installing Ubuntu and forgetting about it.

There's a some flavors of Ubuntu Server, but we suggest to install the latest version of Long-Term Support (LTS), published every two years in April. At this time, the latest version is Ubuntu 18.04.2 LTS (Bionic beaver), with 20.04 LTS scheduled for next April. Despite this, Canonical continues to support Ubuntu 18.04 LTS up to 2022 with security patches extended up to 2027.

Ubuntu is open source and Canonical patches are free, but the company offers a payment service called Ubuntu Advantage, providing phone and web support 24 hours a day, 7 Days of the week. Most notably, it also gives you access to two very useful services:Canonical Livepatch and landscape.

Livepatch install kernel updates automatically without rebooting your system, allowing you to keep your server running even through critical kernel errors. No cost for three machines, but anything else needs Ubuntu Advantage. Scenery is an administration tool designed to monitor the status of your system and install batch updates for packages on multiple servers.

If you want a minimal distribution equivalent to Ubuntu, you can try to run Debian, the distribution Ubuntu is based on. Despite this, basic Debian support is community-based and not that popular.

Amazon Linux

Amazon Linux

Amazon launches its own version of Linux to use in its services. Comes pre-installed with tools to manage your AWS resources, as the AWS CLI interface. In addition there is “tuned for optimal performance on Amazon EC2”, even though the exact performance benefit of using Amazon Linux over another distribution is not clear.

Amazon Linux is likely to contain performance optimizations designed to reduce costs on Amazon's part when running multiple EC2 instances on a hypervisor, and you won't actually see your system running faster compared to Ubuntu.

Amazon Linux is offered as Amazon Machine Image (WHICH) when creating a new EC2 instance. It is the first option, so if you quickly activated an EC2 server, it is likely running on Amazon Linux unless you specify otherwise.

Although a distribution built specifically for your cloud provider comes with great integrations, the main disadvantage of Amazon Linux is that it is exclusive to AWS. If you want to change cloud provider, you may need to spend time configuring your software on a new operating system, which will inevitably lead to problems. The easiest transition would probably be to CentOS, the distribution on which Amazon Linux is based.

Amazon does not offer any kind of live kernel patching service, even though it recommends using the Third-party KernelCare, what does it cost $ 2 per server, per month.

CentOS, Red Hat Enterprise Linux, Fedora

Red Hat Enterprise Linux

These three distributions share communities and are quite similar to each other.. Red Hat Enterprise Linux (RHEL) is a very popular distribution for business servers, but unlike most versions of Linux, no cost. Recently, Red Hat has begun offering RHEL builds for development only.

Fedora is the upstream red hat source, which means that new features are implemented and tested in Fedora before entering RHEL. As such, the distribution will be updated quite frequently and is more “avant-garde” than a stable server distribution.

CentOS is the downstream source for RHEL. It is essentially the free version of RHEL, but it is maintained by an independent team and is independent of Red Hat. If you are looking for a free distribution other than Ubuntu, CentOS is the main contender. It is used much less than Ubuntu, but it is updated less frequently, what can be good or bad in the world of cloud servers.

An important note about RHEL and CentOS is that they are the only distribution that officially supports cPanel, a popular web hosting control panel. If you are looking to use cPanel, you will have to use CentOS or try to run it on a Docker Image, which is probably more of a problem than it is for an app designed to save you time.

Red Hat is the developer of Kpatch, a utility for live kernel patching. Kpatch is free, but it is not automated and needs you to apply patches manually when needed. Works on RHEL and CentOS, as well as in Debian.

Subscribe to our Newsletter

We will not send you SPAM mail. We hate it as much as you.