Linux distributions – a practical guide
The following use cases are inspired by real-world problems, taken mostly from the authors’ own experience in the system administration and software engineering field. Each of these scenarios presents the challenge of choosing the right Linux distribution for the job.
Case study – development workstation
This case study is based on the following scenario made from the perspective of a software developer:
Let’s look at the functional and system requirements before deciding which Linux distribution is fit for the job:
- Functional requirements: The requirements suggest a relatively powerful day-to-day development platform, either a PC/desktop or a laptop computer. The developer relies on local resources to deploy and test the code (for instance, Docker containers and VMs), perhaps frequently in an offline (airplane mode) environment if on the go.
- System requirements: The system will primarily be using the Linux desktop environment and window manager, with frequent context switching between the Integrated Development Environment (IDE) and Terminal windows. The required software packages for the IDE, Docker, hypervisor (VirtualBox), and tools should be readily available from open source or commercial vendors, ideally always being up to date and requiring minimal installation and customization effort.
Choosing the Linux distribution
The choice of Linux distribution here would be the Ubuntu Desktop Long Term Support (LTS) platform. Ubuntu LTS is relatively stable, runs on virtually any hardware platform, and is mostly up to date with hardware drivers. Software packages for the required applications and tools are generally available and stable, with frequent updates. Ubuntu LTS is an enterprise-grade, cost-effective, and secure operating system suitable for organizations and home users alike.
Besides Ubuntu, Fedora and openSUSE are equally suitable for a developer’s workstation. Choosing between them depends on whether you need a Debian- or Red Hat/SUSE-based ecosystem, and whether you need more up-to-date packages or not.
Case study – secure web server
This case study is based on the following scenario made from the perspective of a DevOps engineer:
Let’s look at the functional requirements in this case study. When it comes to open source, secure, and enterprise-grade web servers, the top choices are usually NGINX, Apache HTTP Server, Node.js, Apache Tomcat, and lighttpd. Without going into the details of selecting one web server over another, let’s just assume we pick Apache HTTP Server. It has state-of-the-art SSL/TLS support, excellent performance, and is relatively easy to configure.
We can deploy this web server in VPS environments, in local (on-premises) data centers, or the public cloud. The deployment form factor is either a VM or a Docker container. We are looking for a relatively low-footprint, enterprise-grade Linux platform.
Choosing the Linux distribution
Our choice of Linux distribution is Rocky Linux or AlmaLinux. Most of the time, those two distributions are a perfect match for Apache HTTP Server. They are relatively lightweight, coming only with bare-bones server components and an operating system networking stack. Both Rocky and Alma are widely available as VPS deployment template from both private and public cloud vendors. Our Apache HTTP Server can run as a Docker container on top of Rocky Linux or AlmaLinux, as we may need to horizontally scale to multiple web server instances. More details on setting up a web server are provided in Chapter 13.
Use case – personal blog
This case study is based on the following scenario made from the perspective of a software engineer and blogger:
Let’s discuss the functional requirements for this use case. We are looking for a self-managed publicly hosted Virtual Private Server (VPS) solution. The related hosting cost is a sensitive matter. Also, the maintenance of the required software packages should be relatively easy. We foresee frequent updates, including the Linux platform itself.
Choosing the Linux distribution
Our picks for the Linux distribution in this scenario would be either Debian Stable or Ubuntu Server LTS. As previously highlighted, Ubuntu is a robust, secure, and enterprise-class Linux distribution. Debian is equally stable and offers good options for applications. The platform maintenance and administration efforts are not demanding. The required software packages – Node.js, Ghost, and MySQL – are easily available and are well maintained. Ubuntu Server has a relatively small footprint. We can run our required software stack for blogging easily within the Ubuntu system requirements so the hosting costs would be reasonable.
Use case – media server
This case study is based on the following scenario made from the perspective of a home theater aficionado:
Based on this description, let’s identify the system requirements for this use case. The critical system requirements of a media server are speed (for a high-quality and smooth streaming experience), security, and stability. The related software packages and streaming codecs are subject to frequent updates, so platform maintenance tasks and upgrades are quite frequent. The platform is hosted locally, on a PC desktop system, with plenty of memory and computing power in general. The media is being streamed from the NAS, over the in-house Local Area Network (LAN), where the content is available via an NFS share.
Choosing the Linux distribution
Both Debian and Ubuntu would be excellent choices for a good media server platform. Debian’s stable release is regarded as rock solid and very reliable by the Linux community, although it’s somewhat outdated. Both feature advanced networking and security, but what may come as a decisive factor in choosing between the two is that Plex Media Server has an ARM-compatible package for Debian. The media server package for Ubuntu is only available for Intel/AMD platforms. If we owned a small-factor ARM-processor-based appliance, Debian would be the right choice. Otherwise, Ubuntu LTS would meet our needs here just as well.
Now that you know about different use cases, it is time to pick your Linux distribution and start playing with it. In this chapter, we provided you with a plethora of information that will prove invaluable as you start your journey with Linux.