Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Linux Administration

You're reading from   Mastering Linux Administration Take your sysadmin skills to the next level by configuring and maintaining Linux systems

Arrow left icon
Product type Paperback
Published in Mar 2024
Publisher Packt
ISBN-13 9781837630691
Length 764 pages
Edition 2nd Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Julian Balog Julian Balog
Author Profile Icon Julian Balog
Julian Balog
Alexandru Calcatinge Alexandru Calcatinge
Author Profile Icon Alexandru Calcatinge
Alexandru Calcatinge
Arrow right icon
View More author details
Toc

Table of Contents (24) Chapters Close

Preface 1. Part 1:Basic Linux Administration
2. Chapter 1: Installing Linux FREE CHAPTER 3. Chapter 2: The Linux Shell and Filesystem 4. Chapter 3: Linux Software Management 5. Chapter 4: Managing Users and Groups 6. Chapter 5: Working with Processes, Daemons, and Signals 7. Part 2:Advanced Linux Administration
8. Chapter 6: Working with Disks and Filesystems 9. Chapter 7: Networking with Linux 10. Chapter 8: Linux Shell Scripting 11. Chapter 9: Securing Linux 12. Chapter 10: Disaster Recovery, Diagnostics, and Troubleshooting 13. Part 3:Server Administration
14. Chapter 11: Working with Virtual Machines 15. Chapter 12: Managing Containers with Docker 16. Chapter 13: Configuring Linux Servers 17. Part 4:Cloud Administration
18. Chapter 14: Short Introduction to Cloud Computing 19. Chapter 15: Deploying to the Cloud with AWS and Azure 20. Chapter 16: Deploying Applications with Kubernetes 21. Chapter 17: Infrastructure and Automation with Ansible 22. Index 23. Other Books You May Enjoy

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.

You have been reading a chapter from
Mastering Linux Administration - Second Edition
Published in: Mar 2024
Publisher: Packt
ISBN-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.
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 $19.99/month. Cancel anytime
Banner background image