Book Image

Mastering Ubuntu Server - Third Edition

By : Jay LaCroix
Book Image

Mastering Ubuntu Server - Third Edition

By: Jay LaCroix

Overview of this book

Ubuntu Server has taken data centers around the world 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 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. This third edition is updated to cover the advancements of Ubuntu 20.04 LTS and further train you to understand how to use Ubuntu Server, from initial deployment to creating production-ready resources for your network. The book begins with the concepts of user management, group management, and file system 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 include setting up QEMU & KVM, 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 this Ubuntu Server book, you will be well-versed in Ubuntu server’s advanced concepts and attain the required proficiency needed for Ubuntu Server administration.
Table of Contents (26 chapters)
24
Another Book You May Enjoy
25
Index

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

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.