Book Image

Mastering Ubuntu Server - Second Edition

By : Jay LaCroix
Book Image

Mastering Ubuntu Server - Second Edition

By: Jay LaCroix

Overview of this book

Ubuntu Server has taken the data centers by storm. Whether you're deploying Ubuntu for a large-scale project or for a small office, it is a stable, customizable, and powerful Linux distribution that leads the way with innovative and cutting-edge features. For both simple and complex server deployments, Ubuntu's flexible nature can be easily adapted to meet to the needs of your organization. With this book as your guide, you will learn all about Ubuntu Server, from initial deployment to creating production-ready resources for your network. The book begins with the concept of user management, group management, and filesystem permissions. Continuing into managing storage volumes, you will learn how to format storage devices, utilize logical volume management, and monitor disk usage. Later, you will learn how to virtualize hosts and applications, which will cover setting up KVM/QEMU, as well as containerization with both Docker and LXD. As the book continues, you will learn how to automate configuration with Ansible, as well as take a look at writing scripts. Lastly, you will explore best practices and troubleshooting techniques when working with Ubuntu Server that are applicable to real-world scenarios. By the end of the book, you will be an expert Ubuntu Server administrator who is well-versed in its advanced concepts.
Table of Contents (21 chapters)

What this book covers

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, covers user management in full. Topics here will include creating and removing users, password policies, the sudo command, as well as group management and switching from one user to another.

Chapter 3, 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 and creating links.

Chapter 4, 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, as well as name resolution.

Chapter 5, 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 6, Controlling and Monitoring 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, managing jobs, and understanding the load average.

Chapter 7, 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 our own DHCP and DNS server, as well as installing NTP.

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

Chapter 9, 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 slave database server.

Chapter 10, 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 set up keepalived. Installing Nextcloud is also covered.

Chapter 11, Learning Advanced Shell Techniques, goes over additional tips, tricks, and techniques to enhance the reader's usage of command lines. Topics here include managing output, setting up aliases, investigating Bash history, and more.

Chapter 12, 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 13, Running Containers, discusses the subject of containers and show the reader how to manage containers in both Docker and LXD.

Chapter 14, 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 to automate common administrative tasks, and also how to use ansible-pull.

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

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

Chapter 17, Preventing and Recovering from 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.

Appendix, Using the Alternate Installer, shows the reader how to utilize an alternative installer for Ubuntu that can be used to set up more advanced installations, such as Ubuntu on RAID.