Skip to content
ImagineWorld

Mastering Ubuntu Server

node_idnode-book_mastering-ubuntu-server
node_typenode-book
schema_profileworld.node_book.v1
statusactive
orthogonal_scopemanifold, entropy, authority, state
manifoldworld
entropymedium
authorityinforms
stateexternal
domainimagineworld.net
node_interiorrosetta_contract
unisonone evidence claim read five ways: seated in the os-and-runtimes field, the work masters Ubuntu Server — the server OS installed, secured, and operated — its framework, regime, and stance agreeing on what it is
governed_byWORLD-MANIFOLD
constitutional_citationCONSTITUTION
peer_node_books
book_titleMastering Ubuntu Server
book_authorJay LaCroix
book_publisherPackt Publishing
book_year2022
total_chapters23
updated_at2026-10-14T05:49:56Z
book_copyrightCopyright © 2022 Packt Publishing
book_isbn9781803234243
local graph

node-book_mastering-ubuntu-server_chapter-01-deploying-ubuntu-server — Deploying Ubuntu Server

node-book_mastering-ubuntu-server_chapter-02-managing-users-and-permissions — Managing Users and Permissions

node-book_mastering-ubuntu-server_chapter-03-managing-software-packages — Managing Software Packages

node-book_mastering-ubuntu-server_chapter-04-navigating-and-essential-commands — Navigating and Essential Commands

node-book_mastering-ubuntu-server_chapter-05-managing-files-and-directories — Managing Files and Directories

node-book_mastering-ubuntu-server_chapter-06-boosting-your-command-line-efficiency — Boosting Your Command-line Efficiency

node-book_mastering-ubuntu-server_chapter-07-controlling-and-managing-processes — Controlling and Managing Processes

node-book_mastering-ubuntu-server_chapter-08-monitoring-system-resources — Monitoring System Resources

node-book_mastering-ubuntu-server_chapter-09-managing-storage-volumes — Managing Storage Volumes

node-book_mastering-ubuntu-server_chapter-10-connecting-to-networks — Connecting to Networks

node-book_mastering-ubuntu-server_chapter-11-setting-up-network-services — Setting Up Network Services

node-book_mastering-ubuntu-server_chapter-12-sharing-and-transferring-files — Sharing and Transferring Files

node-book_mastering-ubuntu-server_chapter-13-managing-databases — Managing Databases

node-book_mastering-ubuntu-server_chapter-14-serving-web-content — Serving Web Content

node-book_mastering-ubuntu-server_chapter-15-automating-server-configuration-with-ansible — Automating Server Configuration with Ansible

node-book_mastering-ubuntu-server_chapter-16-virtualization — Virtualization

node-book_mastering-ubuntu-server_chapter-17-running-containers — Running Containers

node-book_mastering-ubuntu-server_chapter-18-container-orchestration — Container Orchestration

node-book_mastering-ubuntu-server_chapter-19-deploying-ubuntu-in-the-cloud — Deploying Ubuntu in the Cloud

node-book_mastering-ubuntu-server_chapter-20-automating-cloud-deployments-with-terraform — Automating Cloud Deployments with Terraform

node-book_mastering-ubuntu-server_chapter-21-securing-your-server — Securing Your Server

node-book_mastering-ubuntu-server_chapter-22-troubleshooting-ubuntu-servers — Troubleshooting Ubuntu Servers

node-book_mastering-ubuntu-server_chapter-23-preventing-disasters — Preventing Disasters

Linux is an exciting platform. You can literally find it everywhere—desktops, laptops, phones, embedded appliances, and especially servers. Linux servers power many famous technologies around the world, and have a massive presence in physical and cloud server environments. Linux servers are scalable, stable, and powerful.

Way back in 1991, a computer science student in Finland, named Linus Torvalds, created a kernel as a school project. He created the Linux kernel. And little did he know at the time, Linux would see us through some of the most exciting innovations in infrastructure design. Things like multicore processors, virtualization, containerization, and cloud computing (to name a few) have transformed data centers all over the world. And Linux has been a part of all of those advancements.

Ubuntu, a popular distribution of Linux, has been a major driving force in the adoption of Linux. Ever since its first release back in 2004, Ubuntu has made Linux more approachable for newcomers, while simultaneously offering powerful features to server administrators. Ubuntu can be found on notebooks and workstations, in addition to servers.

Ubuntu Server enables administrators to create efficient, flexible, and highly available servers that empower organizations with the power of open source. As Ubuntu administrators, we’re in good company—according to W3Techs, Ubuntu is the most widely deployed distribution on the web with regard to Linux. With the release of Ubuntu 22.04, this platform becomes even more exciting!

In this book, we will dive right into Ubuntu Server, and you will learn all the concepts needed to manage your servers and configure them to perform all kinds of neat tasks, such as serving web pages, managing virtual machines, running containers, automating configuration, sharing files with other users, and even running Ubuntu in the cloud.

We’ll start our journey with the first chapter, where we’ll walk through the installation of Ubuntu Server 22.04, which will serve as a foundation for the rest of the book. As we proceed through our journey, we’ll look at managing users, connecting to networks, and controlling processes. Later, we’ll implement important technologies, such as DHCP, DNS, Apache, MariaDB, and more. We’ll even set up our own Nextcloud server along the way.

Finally, the end of the book covers various things we can do to troubleshoot issues, as well as preventing and recovering from disasters.

This book is intended for readers with intermediate or advanced-beginner Linux skills, who would like to learn all about setting up servers with Ubuntu Server. This book assumes that the reader knows the basics of Linux, such as editing configuration files and running basic commands. In addition, this book assumes a basic understanding of fundamental networking concepts, such as DHCP, DNS, IP Addresses, and so on. Also, this book assumes that the reader understands the purpose of basic network hardware, such as routers, switches, and similar hardware.

Chapter 1, Deploying Ubuntu Server, covers the installation process for Ubuntu Server. This chapter walks you through creating bootable media and the installation process.

Chapter 2, Managing Users and Permissions, covers user management in full. Topics here will include creating and removing users, configuring password policies, and using the sudo command, as well as group management and switching from one user to another.

Chapter 3, Managing Software Packages, takes the reader through the process of searching for, installing, and managing packages. This will include managing APT repositories and installing packages, and even a look at Snap packages.

Chapter 4, Navigating and Essential Commands, teaches you the essential commands needed necessary for navigating through directory trees, viewing the contents of log files, and perusing log files.

Chapter 5, Managing Files and Directories, expands on the knowledge gained from the previous chapter and rounds out your toolset of essential commands by going over how to edit, copy, move, and rename files.

Chapter 6, Boosting Your Command-line Efficiency, goes over additional tips, tricks, and techniques to enhance the reader’s usage of the command line. Topics here include managing output, investigating Bash history, and more.

Chapter 7, Controlling and Managing Processes, teaches the reader how to manage what is running on the server, as well as how to stop misbehaving processes. This will include having a look at htop, systemd, and managing jobs.

Chapter 8, Monitoring System Resources, goes over how to manage valuable system resources on your server, such as viewing disk and memory usage, as well as understanding load average and how it impacts your CPU.

Chapter 9, Managing Storage Volumes, takes a look at storage volumes. You’ll be shown how to view disk usage, format volumes, manage the /etc/fstab file, use LVM, and more. In addition, we’ll look at managing swap.

Chapter 10, Connecting to Networks, takes a look at networking in Ubuntu, specifically how to connect to resources from other nodes. We’ll look at assigning IP addresses, connecting to other nodes via OpenSSH, and name resolution.

Chapter 11, Setting Up Network Services, revisits networking with more advanced concepts. In this chapter, the reader will learn more about the technologies that glue our network together, such as DHCP and DNS. The reader will set up their own DHCP and DNS server, as well as installing NTP.

Chapter 12, Sharing and Transferring Files, is all about sharing files with others. Concepts will include the setup of Samba and NFS network shares, and we will even go over transferring files manually with rsync and scp.

Chapter 13, Managing Databases, takes the reader through the journey of setting up and managing databases via MariaDB. The reader will learn how to install MariaDB, how to set up databases, and how to create a secondary database server.

Chapter 14, Serving Web Content, takes a look at serving content with Apache. In addition, the reader will be shown how to secure Apache with an SSL certificate, manage modules, and even set up a Nextcloud server by the end of the chapter.

Chapter 15, Automating Server Configuration with Ansible, will show the reader how to set up a Git repository for holding configuration management scripts, how to use the powerful Ansible tool to automate common administrative tasks, and also how to use ansible-pull.

Chapter 16, Virtualization, is all about virtualization (unsurprisingly!). The reader will be walked through setting up their very own KVM installation, as well as how to manage virtual machines with virt-manager.

Chapter 17, Running Containers, discusses the subject of containers and shows the reader how to manage containers in both Docker and LXD.

Chapter 18, Container Orchestration, teaches you how to take containers to the next level and manage them with the power of Kubernetes. You’ll not only learn how to install Micro K8s, but also how to build your very own Kubernetes cluster from scratch.

Chapter 19, Deploying Ubuntu in the Cloud, shows you how to spin up Ubuntu servers in the cloud, with an introduction to Amazon Web Services (AWS).

Chapter 20, Automating Cloud Deployments with Terraform, goes over the process of automating the process of building cloud infrastructure using Terraform.

Chapter 21, Securing Your Server, takes a look at various things the reader can do to strengthen security on Ubuntu servers. Topics will include lowering the attack surface, securing OpenSSH, setting up a firewall, and more.

Chapter 22, Troubleshooting Ubuntu Servers, consists of topics relating to things we can do when our deployments don’t go according to plan. The reader will also investigate the problem space, view system logs, and trace network issues.

Chapter 23, Preventing Disasters, informs the reader of various strategies that can be used to prevent and recover from disasters. This includes a look at utilizing Git for configuration management, implementing a backup plan, and more.

This book is for readers who already have some experience with Linux, though it doesn’t necessarily have to be with Ubuntu. Preferably, the reader will understand basic Linux command-line skills, such as changing directories, listing contents, and issuing commands as regular users or with root. It’s also preferred that the reader understands foundational networking concepts, such as the purpose of things like DHCP, DNS, as well as IP addressing. Even if you feel as though you need a refresher, you should read this book anyway—the opening chapters will cover many of these concepts.

In this book, we’ll take a look at real-world situations in which we can deploy Ubuntu Server. This will include the installation process, serving web pages, setting up databases, and much more. Specifically, the goal here is to be productive. Each chapter will teach the reader a new and valuable concept, using practical examples that are relative to real organizations. Basically, we focus on getting things done, rather than focusing primarily on theory. Although the theory that goes into Linux and its many distributions is certainly interesting, the goal here is to get you to the point where if a work colleague or client asks you to perform work on an Ubuntu-based server, you’ll be in a good position to get the task done. Therefore, if your goal is to get up and running with Ubuntu Server and learn the concepts that really matter, this book is definitely for you.

To follow along, you’ll either need a server on which to install Ubuntu Server, a virtual Ubuntu instance from a cloud provider, or a laptop or desktop capable of running at least one virtual machine.

The code bundle for the book is hosted on GitHub at https://github.com/PacktPublishing/Mastering-Ubuntu-Server-Fourth-Edition

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “Anyway, back to our /etc/passwd file. The fifth column is designated for user info, most commonly the user’s first and last names.”

A block of code is set as follows:

description: External access profile
devices:
eth0:
name: eth0
nictype: bridged
parent: br0
type: nic

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are highlighted:

- name: Start the apache2 services
ansible.builtin.service:
name: apache2
state: started
enabled: true

Any command-line input or output is written as follows:

sudo apt install docker.io

Bold: Indicates a new term, an important word, or words that you see on the screen. For instance, words in menus or dialog boxes appear in the text like this. For example: “Select System info from the Administration panel.”

Warnings or important notes appear like this.

Tips and tricks appear like this.


Source: