Reader small image

You're reading from  Mastering Linux Administration - Second Edition

Product typeBook
Published inMar 2024
PublisherPackt
ISBN-139781837630691
Edition2nd Edition
Right arrow
Authors (2):
Alexandru Calcatinge
Alexandru Calcatinge
author image
Alexandru Calcatinge

Alexandru Calcatinge is an open-minded architect with a background in computer science and mathematics. He is a senior university lecturer with a PhD in urban planning from Ion Mincu University of Architecture and Urban Planning and a postgraduate degree in DevOps from Caltech's Center for Technology and Management Education (CTME). He teaches students about architectural programming and development and open source technologies. He has authored five books on architecture and urban planning and numerous scientific articles on urban and rural development. Alex was certified as a Linux trainer in 2017. He loves the DevOps philosophy and the possibilities that cloud technologies bring for the future. He is also a certified programming analyst, computer network administrator, trainer, designer, and life coach.
Read more about Alexandru Calcatinge

Julian Balog
Julian Balog
author image
Julian Balog

Julian Balog is a senior software engineer with more than 15 years of experience in the industry. Currently, his work primarily focuses on application delivery controllers, containerized workflows, networking, and security. With a never-ending passion for Linux and open-source technologies, Julian is always in pursuit of learning new things while solving problems and making things work through simple, efficient, and practical engineering. He lives with his wife, two children, and an Aussie-doodle in the greater Seattle area, Washington.
Read more about Julian Balog

View More author details
Right arrow

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:

I’m a backend/frontend developer, writing mostly in Java, Node.js, Python, and Golang, and using mostly IntelliJ and VS Code as my primary IDE. My development environment makes heavy use of Docker containers (both building and deploying) and I occasionally use VMs (with VirtualBox) to deploy and test my code locally. I need a robust and versatile development platform.

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:

I’m looking for a robust platform running a secure, relatively lightweight, and enterprise-grade web server. This web server handles HTTP/SSL requests, offloading SSL before routing requests to other backend web servers, websites, and API endpoints. No load-balancing features are needed.

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:

I want to create a software engineering blog. I’ll be using the Ghost blogging platform, running on top of Node.js, with MySQL as the backend database. I’m looking for a hosted Virtual Private Server (VPS) solution by one of the major cloud providers. I’ll be installing, maintaining, and managing the related platform myself. Which Linux distribution should I use?

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:

I have a moderately large collection of movies (personal DVD/Blu-ray backups), videos, photos, and other media, stored on Network Attached Storage (NAS). The NAS has its own media server incorporated, but the streaming performance is rather poor. I’m using Plex as a media player system, with Plex Media Server as the backend. What Linux platform should I use?

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.

Previous PageNext Page
You have been reading a chapter from
Mastering Linux Administration - Second Edition
Published in: Mar 2024Publisher: PacktISBN-13: 9781837630691
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Alexandru Calcatinge

Alexandru Calcatinge is an open-minded architect with a background in computer science and mathematics. He is a senior university lecturer with a PhD in urban planning from Ion Mincu University of Architecture and Urban Planning and a postgraduate degree in DevOps from Caltech's Center for Technology and Management Education (CTME). He teaches students about architectural programming and development and open source technologies. He has authored five books on architecture and urban planning and numerous scientific articles on urban and rural development. Alex was certified as a Linux trainer in 2017. He loves the DevOps philosophy and the possibilities that cloud technologies bring for the future. He is also a certified programming analyst, computer network administrator, trainer, designer, and life coach.
Read more about Alexandru Calcatinge

author image
Julian Balog

Julian Balog is a senior software engineer with more than 15 years of experience in the industry. Currently, his work primarily focuses on application delivery controllers, containerized workflows, networking, and security. With a never-ending passion for Linux and open-source technologies, Julian is always in pursuit of learning new things while solving problems and making things work through simple, efficient, and practical engineering. He lives with his wife, two children, and an Aussie-doodle in the greater Seattle area, Washington.
Read more about Julian Balog