systemd for Linux SysAdmins: All You Need to Know About the systemd Suite for Linux Users / systemd для системных администраторов Linux: Все, что Вам нужно знать о systemd Suite для пользователей Linux Год издания: 2025 Автор: Both David / Бот Дэвид Издательство: Apress Media LLC ISBN: 979-8-8688-1328-3 Язык: Английский Формат: PDF/EPUB Качество: Издательский макет или текст (eBook) Количество страниц: 436 Описание: Explore the world of systemd—yes, all lower-case, even at the beginning of a sentence— which is the modern replacement for init and SystemV init scripts. It is also much more. It can evoke a wide range of reactions from SysAdmins and others responsible for keeping Linux systems up and running. The fact that systemd is taking over so many tasks in modern Linux systems has engendered push-back and discord among certain groups of developers and SysAdmins. You will learn systemd’s strengths and weaknesses, and why there’s no truth in the myth that systemd is a monolithic monstrosity. Learn how systemd is the mother of all processes, and is responsible for bringing the Linux host up to a state in which productive work can be done. You’ll learn about the functions assumed by systemd, which is far more extensive than the old init program, and how it manages many aspects of a running Linux host, including: Mounting filesystems Managing hardware Creating new systemd services and understanding existing ones Creating timers that trigger system maintenance events Starting and managing the system services that are required to have a productive Linux host Using the systemd journal to access critical performance and problem solving information. Why the systemd plan to take over the world is actually a good thing systemd for Linux SysAdmins is your one-stop shop, giving you everythiing you need to get started and utilize this software suite for Linux operatiing systems. You Will Learn: How to use systemd, what it is, and what it does To manage each of the major functional components of systemd and learn from real-world examples to illustrate their typical usage by SysAdmins Pragmatic work-arounds, hints and tricks to minimize issues to ensure you have greater systemd functionality This Book is for: Linux system administrators (SysAdmins) who need to or are already in the process of switching from SystemV to systemd. It’s also intended for SysAdmins with more systemd experience but who want to improve their knowledge and skills with systemd. Познакомьтесь с миром systemd — да, все строчные буквы, даже в начале предложения, — который является современной заменой сценариям инициализации init и SystemV. Это также гораздо больше. Это может вызвать широкий спектр реакций со стороны сисадминов и других лиц, ответственных за поддержание работоспособности Linux-систем. Тот факт, что systemd берет на себя так много задач в современных системах Linux, вызвал противодействие и разногласия среди определенных групп разработчиков и сисадминов. Вы узнаете о сильных и слабых сторонах systemd и о том, почему миф о том, что systemd - это монолитное чудовище, не соответствует действительности. Узнайте, что systemd является прародителем всех процессов и отвечает за приведение Linux-сервера в состояние, при котором возможна продуктивная работа. Вы узнаете о функциях systemd, которые намного шире, чем у старой программы init, и о том, как она управляет многими аспектами работы Linux-сервера, включая: Монтирование файловых систем Управление оборудованием Создание новых служб systemd и понимание существующих. Создание таймеров, запускающих события обслуживания системы Запуск системных служб и управление ими, необходимые для обеспечения работоспособности Linux-узла Использование журнала systemd для доступа к важной информации о производительности и решении проблем. Почему план systemd по завоеванию мира на самом деле хорош systemd для системных администраторов Linux - это ваш универсальный сервис, предоставляющий вам все необходимое для начала работы и использования этого пакета программного обеспечения для операционных систем Linux. Вы узнаете: Как использовать systemd, что это такое и что он делает Чтобы управлять каждым из основных функциональных компонентов systemd и учиться на реальных примерах, иллюстрирующих их типичное использование системными администраторами Практические решения, советы и хитрости, позволяющие минимизировать проблемы и обеспечить более высокую функциональность systemd Эта книга предназначена для: Системные администраторы Linux (сисадмины), которым необходимо или которые уже находятся в процессе перехода с SystemV на systemd. Это приложение также предназначено для системных администраторов с большим опытом работы с systemd, но которые хотят улучшить свои знания и навыки с помощью systemd.
Примеры страниц (скриншоты)
Оглавление
About the Author ...................................................................................................xv About the Technical Reviewer ..................................................................................xvii Acknowledgments ..................................................................................................xix Introduction ..........................................................................................................xxi Chapter 1: Learning to Love systemd ........................................................................1 Objectives .............................................................................................................1 Overview ...............................................................................................................2 Linux Boot .............................................................................................................2 systemd Controversy ..............................................................................................3 Why I Prefer SystemV ............................................................................................4 Why I Prefer systemd ............................................................................................5 The Real Issue .....................................................................................................5 Replacing SystemV ..............................................................................................6 systemd Tasks ....................................................................................................7 More Data for the Admin .....................................................................................11 systemd Standardizes Configuration ......................................................................13 Architecture ........................................................................................................13 systemd As PID 1 ................................................................................................14 Preparation .........................................................................................................20 Summary ............................................................................................................21 Exercises .............................................................................................................22 Chapter 2: Linux Boot and Startup ..........................................................................23 Objectives ...........................................................................................................23 Overview .............................................................................................................24 Hardware Boot ....................................................................................................25 The Boot Sector .............................................................................................26 Linux Boot ...........................................................................................................28 GRUB .............................................................................................................28 The GUID Partition Table ................................................................................29 The Kernel .....................................................................................................33 Linux Startup .......................................................................................................34 systemd .........................................................................................................36 Graphical Login ...................................................................................................46 Display Manager ............................................................................................47 Window Manager ...........................................................................................48 How Do I Deal with All These Choices? .........................................................50 Console Login ......................................................................................................57 Virtual Consoles .............................................................................................59 How Logins Work ................................................................................................61 CLI Login Screen ............................................................................................63 GUI Login Screen ...........................................................................................64 Summary ............................................................................................................65 Exercises .............................................................................................................66 Chapter 3: Understanding Linux Startup with systemd ...............................................67 Objectives ...........................................................................................................67 Overview .............................................................................................................68 Exploring Linux Startup with systemd ................................................................68 Targets ................................................................................................................73 Exploring the Current Target ..........................................................................76 Switching to a Different Target ......................................................................78 Changing the Default Target ..........................................................................79 Summary ............................................................................................................85 Exercises .............................................................................................................85 Chapter 4: How to Manage Startup Using systemd ....................................................87 Objectives ...........................................................................................................87 Overview .............................................................................................................88 Preparation .........................................................................................................88 The Program .......................................................................................................89 The Service Unit ..................................................................................................90 Creating the Service Unit ...............................................................................93 Start the Service ............................................................................................96 Reboot—Finally ...........................................................................................104 Changing the Sequence ..............................................................................106 Ensure a Service Starts After the Network Is Running .....................................111 Summary ..........................................................................................................114 Exercises ...........................................................................................................115 Chapter 5: Manage systemd Units with systemctl ....................................................117 Objectives .........................................................................................................117 Overview ...........................................................................................................117 Preparation .......................................................................................................118 systemd Suite ...................................................................................................118 Practical Structure .......................................................................................119 systemctl .....................................................................................................121 Service Units ...............................................................................................128 Mounts the Old Way .....................................................................................133 Creating a Mount Unit ..................................................................................139 Summary ..........................................................................................................142 Exercises ...........................................................................................................142 Chapter 6: Control Your Computer Time and Date with systemd ................................145 Objectives .........................................................................................................145 Overview ...........................................................................................................146 Why Time Is Important to Computers ................................................................147 Multiple Times ...................................................................................................147 NTP ...................................................................................................................148 The NTP Server Hierarchy ...........................................................................149 NTP Implementation Options .......................................................................149 NTP Client Configuration .............................................................................151 NTP Server Pools .........................................................................................153 Chrony ...............................................................................................................154 Using chronyc from the Command Line ......................................................155 Chronyc As an Interactive Tool .....................................................................162 systemd-timesync ............................................................................................164 Configure systemd-timesyncd .....................................................................169 Start timesyncd ...........................................................................................171 Set the Hardware Clock ...............................................................................172 Do You Really Need RTC? ............................................................................175 Summary ..........................................................................................................176 Exercises ...........................................................................................................177 Chapter 7: Analyzing systemd Calendar and Time Spans .........................................179 Objectives .........................................................................................................179 Overview ...........................................................................................................180 Definitions .........................................................................................................180 Absolute Timestamp ....................................................................................180 Accuracy ......................................................................................................181 Calendar Event ............................................................................................181 Time Span ....................................................................................................182 Calendar Event Expressions ........................................................................182 Exploring systemd Time Syntax ...................................................................183 Summary ..........................................................................................................193 Exercises ...........................................................................................................193 Chapter 8: Using systemd Timers .........................................................................195 Objectives .........................................................................................................195 Overview ...........................................................................................................195 System Maintenance Timers .............................................................................196 Creating a Timer ................................................................................................202 Timer Accuracy .................................................................................................207 Timer Types .......................................................................................................210 OnCalendar Event Expressions .........................................................................212 Superfluous Timers ...........................................................................................214 Summary ..........................................................................................................215 Exercises ...........................................................................................................216 Chapter 9: Using systemd Journals .......................................................................219 Objectives .........................................................................................................219 Overview ...........................................................................................................219 The Journal .......................................................................................................221 The systemd Journal Service ............................................................................224 Configuration ....................................................................................................225 About that Binary Data Format… .....................................................................226 The journalctl Command ...................................................................................229 Commonly Used Options .............................................................................238 Other Interesting Options ............................................................................240 Journal Files ................................................................................................242 Adding Your Own Journal Entries ................................................................243 Journal Storage Usage ......................................................................................244 Journal File Rotation ...................................................................................246 Summary ..........................................................................................................253 Exercises ...........................................................................................................253 Chapter 10: Managing the Firewall with firewalld ....................................................255 Objectives .........................................................................................................255 Introduction .......................................................................................................256 Ports ............................................................................................................256 Firewall Rules ...................................................................................................259 Firewall Tools ....................................................................................................261 Block (Almost) Everything .................................................................................262 Crunchy on the Outside .....................................................................................263 firewalld ............................................................................................................263 firewalld Zones ............................................................................................264 Using --reload ..............................................................................................288 Zone Files ....................................................................................................289 Panic Mode ..................................................................................................293 firewall-config GUI .......................................................................................295 nftables .............................................................................................................295 Outbound Blocking ............................................................................................297 Fail2Ban ............................................................................................................298 Cleanup .............................................................................................................302 Summary ..........................................................................................................302 Exercises ...........................................................................................................303 Chapter 11: Resource Management with cgroups ....................................................305 Objectives .........................................................................................................305 Introduction .......................................................................................................305 Using cgroups for Process Management ..........................................................306 Exploring the Cgroup Hierarchy ........................................................................311 Managing cgroups with systemd ......................................................................316 Summary ..........................................................................................................317 Exercises ...........................................................................................................318 Chapter 12: Using systemd-resolved Name Service .................................................319 Objectives .........................................................................................................319 Introduction .......................................................................................................320 How a Name Search Works ...............................................................................320 resolv.conf .........................................................................................................322 Historical Usage ..........................................................................................323 Current Usage ..............................................................................................324 Name Service Strategies ..................................................................................326 The /etc/hosts File .......................................................................................326 mDNS ..........................................................................................................329 nss-DNS .......................................................................................................337 systemd-resolved.service ...........................................................................343 Fedora Name Resolution Fails When Using systemd-resolved .........................345 Determining the Problem ............................................................................346 Resolving the Problem .................................................................................349 Concluding Thoughts About nsswitch ..........................................................355 Summary ..........................................................................................................356 Exercises ...........................................................................................................356 Chapter 13: Replacing rc.local in systemd ..............................................................357 Objectives .........................................................................................................357 Introduction .......................................................................................................357 Boot vs. Startup ...........................................................................................358 Local Startup .....................................................................................................359 Create the Executable File ...........................................................................359 Create the systemd Service ........................................................................361 Enable the New Service ..............................................................................363 Revise mystartup.sh ....................................................................................364 Final Test .....................................................................................................365 A Temporary Option ...........................................................................................367 Cleanup .............................................................................................................368 Summary ..........................................................................................................368 Exercises ...........................................................................................................368 Chapter 14: Getting More Out of the Journal ..........................................................371 Objectives .........................................................................................................371 Introduction .......................................................................................................371 Options to Narrow Search Results ....................................................................372 A Troubleshooting Example .........................................................................377 Determining the Problem ............................................................................377 First Solution ...............................................................................................380 The Better Solution ......................................................................................383 Summary ..........................................................................................................385 Exercises ...........................................................................................................386 Chapter 15: Analyzing systemd Startup and Configuration .......................................387 Objectives .........................................................................................................387 Overview ...........................................................................................................388 Linux Startup .....................................................................................................388 Basic Analysis ..............................................................................................389 The Blame Game .........................................................................................390 Critical Chain ...............................................................................................391 System State ...............................................................................................396 Analytic Graphs ...........................................................................................399 Conditionals .................................................................................................401 Listing Configuration Files ................................................................................402 Unit File Verification ..........................................................................................405 Security .............................................................................................................405 Summary ..........................................................................................................407 Exercises ...........................................................................................................408 Chapter 16: Why I Support the systemd Plan to Take Over the World ........................409 Introduction .......................................................................................................409 More Data for the Admin ...................................................................................411 systemd Standardizes Configuration ................................................................416 Sometimes, the Pain .........................................................................................416 Five Reasons SysAdmins Love systemd ...........................................................417 Boot Management .......................................................................................418 Log Reviews ................................................................................................419 Service Management ..................................................................................420 Timers .....................................................................................................422 Targets ....................................................................................................423 Taking Control with systemd .......................................................................423 Final Exercise ...........................................................................................424 Appendix A: systemd Resources ...................................................................425 Index ........................................................................................................429
Both David / Бот Дэвид - systemd for Linux SysAdmins / systemd для системных администраторов Linux [2025, PDF/EPUB, ENG] download torrent for free and without registration
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum