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

The systemd controversy

If you've been in the computer world for any length of time, you may have seen that we geeks can get quite passionate about our operating systems. In the early 1990s, I finally replaced my text mode-only 8088 machine with one that could run a graphical interface. I first gave Windows 3.1 a try, and quickly decided that I really hated it. So, I bought a copy of OS/2, which I liked much better and ran for quite a few years on my home-built 486 machine. But, all of my geek buddies at work were big Windows fans, and they kept arguing with me about how much better Windows is. I thought that they were all crazy, and we kept getting into some rather heated arguments.

Then, when I got into Linux, I quickly learned that you don't want to go into any Linux forum and ask which Linux distro is the best for a newbie to start with. All that does is start fights, leaving the poor newbie more confused than ever. And now, the fight is over whether or not systemd is a good thing. Here are some of the objections:

  • By trying to do too much, systemd violates the Unix concept of having each utility just do one thing but having it do it well.
  • It's controlled by a large corporation (Red Hat).
  • It's a security problem.
  • Its journald component saves system logs to a binary format, which some people believe is more easily corrupted than the plain-text files that rsyslog creates.

If you look at things objectively, you might see that the objections aren't so bad:

  • Yes, the systemd ecosystem includes more than just the init system. It also includes network, bootloader, logging, and log-in components. But those components are all optional, and not all Linux distros use them in a default setup.
  • It was created primarily by Red Hat, and the project leader is a Red Hat employee. But Red Hat released it under a free-as-in-speech software license, which means that no one company can ever take full control of it. Even if Red Hat were to suddenly decide that future versions of systemd were to be proprietary, the free code is still out there, and someone would fork it into a new free version.
  • Yes, there have been some security bugs in systemd. But that's also true of OpenSSL, the Bash shell, and even the Linux kernel itself. To complain about systemd's security would only be valid if the bugs hadn't gotten fixed.
  • The journald component does create log files in a binary format. But it's still possible to run rsyslog on systemd distros, and most do. Some distros, such as the Red Hat Enterprise Linux 8 family, use journald to gather system information and then just have journald pass the information to rsyslog in order to create normal text files. So, with RHEL 8, we have the best of both worlds.

Soon after the release of systemd, some people who had never even tried it put up blog posts that explained why systemd was pure evil and that they would never use it. A few years ago, I created a systemd tutorial playlist on my BeginLinux Guru channel on YouTube. The first video is called Why systemd?. Quite a few people left comments about why they would never use systemd and said that they would change to either a non-systemd Linux distro or to a FreeBSD-type distro in order to avoid it.

The bottom line is this: all enterprise-grade Linux distros now use systemd. So, I think that it might be here to stay.