Book Image

Linux Service Management Made Easy with systemd

4 (1)
Book Image

Linux Service Management Made Easy with systemd

4 (1)

Overview of this book

Linux Service Management Made Easy with systemd will provide you with an in-depth understanding of systemd, so that you can set up your servers securely and efficiently.This is a comprehensive guide for Linux administrators that will help you get the best of systemd, starting with an explanation of the fundamentals of systemd management.You’ll also learn how to edit and create your own systemd units, which will be particularly helpful if you need to create custom services or timers and add features or security to an existing service. Next, you'll find out how to analyze and fix boot-up challenges and set system parameters. An overview of cgroups that'll help you control system resource usage for both processes and users will also be covered, alongside a practical demonstration on how cgroups are structured, spotting the differences between cgroups Version 1 and 2, and how to set resource limits on both. Finally, you'll learn about the systemd way of performing time-keeping, networking, logging, and login management. You'll discover how to configure servers accurately and gather system information to analyze system security and performance. By the end of this Linux book, you’ll be able to efficiently manage all aspects of a server running the systemd init system.
Table of Contents (23 chapters)
1
Section 1: Using systemd
12
Section 2: Understanding cgroups
16
Section 3: Logging, Timekeeping, Networking, and Booting

Understanding Netplan on Ubuntu

Netplan is the new network configuration tool for Ubuntu. On a desktop machine, it doesn't do much except tell the system to use NetworkManager. On a server, you would create the networkd configuration in a .yaml file in the /etc/netplan/ directory. Netplan will take this .yaml file and translate its contents into networkd format.

Viewing installer-generated Netplan configurations

To begin, I'd like to show you the default configuration on an Ubuntu desktop machine. (Yeah, I know. I didn't tell you that you'd need an Ubuntu desktop virtual machine, but that's okay. This is the only time we'll need it, so you can just look at what I'm showing you here.) In the /etc/netplan/ directory, we have the default configuration file that was created when I created the virtual machine:

donnie@donald-virtualbox:~$ cd /etc/netplan/
donnie@donald-virtualbox:/etc/netplan$ ls -l
total 4
-rw-r--r-- 1 root root 104 Feb ...