source: BOOK/final-system/common/systemd.xml@ 9edf96a

systemd
Last change on this file since 9edf96a was 3cc92be, checked in by William Harrington <kb0iic@…>, 8 years ago

Remove blank line in test commands.

  • Property mode set to 100644
File size: 23.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7<sect1 id="ch-system-systemd" role="wrap">
8 <?dbhtml filename="systemd.html"?>
9
10 <title>Systemd-&systemd-version;</title>
11
12 <indexterm zone="ch-system-systemd">
13 <primary sortas="a-systemd">Systemd</primary>
14 </indexterm>
15
16 <sect2 role="package">
17 <title/>
18
19 <para>The systemd package is a system and service manager for Linux
20 operating systems.</para>
21
22 </sect2>
23
24 <sect2 role="installation">
25 <title>Installation of Systemd</title>
26
27 <para os="s1">Prevent the <filename>Makefile</filename> from trying to run
28 <command>setcap</command> on <command>systemd-detect-virt</command>,
29 which will fail if the kernel or file system does not support extended
30 capabilities:</para>
31
32<screen os="s2"><userinput>sed -i '/virt-install-hook /d' Makefile.in</userinput></screen>
33
34 <para os="s3">The <filename>timesyncd.conf</filename> file contains a
35 reference to a non-existent <filename>timesyncd.conf(5)</filename> man
36 page. Remove that reference to avoid possible confusion:</para>
37
38<screen os="s4"><userinput>sed -i '/timesyncd.conf/d' src/timesync/timesyncd.conf.in</userinput></screen>
39
40 <para os="cc1">Create a file to declare some variables</para>
41
42<screen os="cc2"><userinput>cat &gt; config.cache &lt;&lt; "EOF"
43<literal>KILL="/bin/kill"
44MOUNT_PATH="/bin/mount"
45UMOUNT_PATH="/bin/umount"
46SULOGIN="/sbin/sulogin"
47XSLTPROC="/usr/bin/xsltproc"</literal>
48EOF</userinput></screen>
49
50 <para os="a">Prepare systemd for compilation:</para>
51
52<screen os="b"><userinput>./configure \
53 --prefix=/usr \
54 --sysconfdir=/etc \
55 --localstatedir=/var \
56 --libexecdir=/usr/lib \
57 --docdir=/usr/share/doc/systemd-&systemd-version; \
58 --with-rootprefix="" \
59 --with-rootlibdir=/lib \
60 --enable-split-usr \
61 --disable-firstboot \
62 --disable-ldconfig \
63 --disable-lto \
64 --disable-sysusers \
65 --with-default-dnssec=no \
66 --with-kbd-loadkeys=/bin/loadkeys \
67 --with-kbd-setfont=/bin/setfont \
68 --with-dbuspolicydir=/etc/dbus-1/system.d \
69 --with-dbussessionservicedir=/usr/share/dbus-1/services \
70 --with-dbussystemservicedir=/usr/share/dbus-1/system-services \
71 --config-cache</userinput></screen>
72
73 <variablelist os="c">
74 <title>The meaning of the configure options:</title>
75
76 <varlistentry>
77 <term><parameter>--config-cache</parameter></term>
78 <listitem>
79 <para>Use the created <filename>config.cache</filename>.</para>
80 </listitem>
81 </varlistentry>
82
83 <varlistentry>
84 <term><parameter>--with-root*</parameter></term>
85 <listitem>
86 <para>These switches ensure that core programs and
87 shared libraries are installed in the subdirectories
88 of the root partition.</para>
89 </listitem>
90 </varlistentry>
91
92 <varlistentry>
93 <term><parameter>--enable-split-usr</parameter></term>
94 <listitem>
95 <para>This switch ensures that systemd will work on
96 systems where /bin, /lib and /sbin directories are not
97 symlinks to their /usr counterparts.</para>
98 </listitem>
99 </varlistentry>
100
101 <varlistentry>
102 <term><parameter>--disable-firstboot</parameter></term>
103 <listitem>
104 <para>This switch prevents installation of systemd services
105 responsible for setting up the system for the first time.
106 They are not useful for CLFS as everything is done manually.
107 </para>
108 </listitem>
109 </varlistentry>
110
111 <varlistentry>
112 <term><parameter>--disable-ldconfig</parameter></term>
113 <listitem>
114 <para>This switch prevents installation of a systemd unit that runs
115 <command>ldconfig</command> at boot, and increases boot time.
116 While it may be not useful for source distributions like CLFS,
117 this option may be removed.</para>
118 </listitem>
119 </varlistentry>
120
121 <varlistentry>
122 <term><parameter>--disable-lto</parameter></term>
123 <listitem>
124 <para>This prevents the build system from using GCC's Link-time
125 optimization (LTO), to ensure that systemd's binaries will not try
126 to link to <filename class="libraryfile">libgcc_s</filename></para>
127 </listitem>
128 </varlistentry>
129
130 <varlistentry>
131 <term><parameter>--disable-sysusers</parameter></term>
132 <listitem>
133 <para>This switch prevents install of systemd services which setup
134 the previously created <filename>/etc/group</filename> and
135 <filename>/etc/passwd</filename> files.</para>
136 </listitem>
137 </varlistentry>
138
139 <varlistentry>
140 <term><parameter>--with-dbus*</parameter></term>
141 <listitem>
142 <para>These switches ensure that D-Bus configuration files get
143 installed to the correct locations.</para>
144 </listitem>
145 </varlistentry>
146
147 <varlistentry>
148 <term><parameter>--with-default-dnssec=no</parameter></term>
149 <listitem>
150 <para>This switch turns off the experimental DNSSEC support.</para>
151 </listitem>
152 </varlistentry>
153
154 </variablelist>
155
156 <para os="d">Compile the package:</para>
157
158<screen os="e"><userinput>make</userinput></screen>
159
160 <para os="f">Prevent a broken test case from running:</para>
161
162<screen os="g"><userinput remap="test">sed -e 's@test/udev-test.pl @@' \
163 -e 's@test-copy$(EXEEXT) @@' \
164 -i Makefile.in
165</userinput></screen>
166
167 <para os="h">To test the results, issue:</para>
168
169<screen os="i"><userinput remap="test">sed -i "s:minix:ext4:g" src/test/test-path-util.c
170make check</userinput></screen>
171
172 <para os="j">Install the package:</para>
173
174<screen os="k"><userinput>make install</userinput></screen>
175
176 <para os="l">Install documentation files that are not installed by default:</para>
177
178<screen os="m"><userinput>install -v -m644 man/*.html /usr/share/doc/systemd-&systemd-version;</userinput></screen>
179
180 <para os="p">Remove an unnecessary directory:</para>
181
182<screen os="q"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
183
184 <para os="r">Create symlinks for backwards-compatibility with Sysvinit:</para>
185
186<screen os="s"><userinput>for tool in runlevel reboot shutdown poweroff halt telinit; do
187 ln -sfv ../bin/systemctl /sbin/$tool
188done
189ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
190
191 </sect2>
192
193 <sect2 id="conf-systemd" role="configuration">
194 <title>Configuring Systemd</title>
195
196 <indexterm zone="conf-systemd">
197 <primary sortas="a-systemd">systemd</primary>
198 <secondary>configuring</secondary></indexterm>
199
200 <indexterm zone="conf-systemd">
201 <primary sortas="e-/etc/os-release">/etc/os-release</primary>
202 </indexterm>
203
204 <para>Create <filename>/etc/machine-id</filename> which is needed
205 by Journald:</para>
206
207<screen><userinput>systemd-machine-id-setup</userinput></screen>
208
209 <para>Create a file to identify the operating system.
210 <command>systemd</command> will use this file on boot to put information
211 on the screen.</para>
212
213<screen><userinput>cat &gt; /etc/os-release &lt;&lt; "EOF"
214# Begin /etc/os-release
215
216NAME=Cross-LFS
217ID=clfs
218
219PRETTY_NAME=Cross Linux From Scratch
220ANSI_COLOR=0;33
221
222VERSION=&version;
223VERSION_ID=&versionid;
224
225# End /etc/os-release
226EOF</userinput></screen>
227
228 </sect2>
229
230 <sect2 id="contents-systemd" role="content">
231 <title>Contents of Systemd</title>
232
233 <segmentedlist>
234 <segtitle>Installed programs</segtitle>
235 <segtitle>Installed libraries</segtitle>
236 <segtitle>Installed directories</segtitle>
237
238 <seglistitem>
239 <seg>bootctl, busctl, halt (link to systemctl), hostnamectl,
240 init (link to systemd), journalctl, kernel-install, localectl, loginctl,
241 machinectl, poweroff (link to systemctl), reboot (link to systemctl),
242 runlevel (link to systemctl), shutdown (link to systemctl),
243 systemctl, systemd, system-analyze, systemd-ask-password, systemd-cat,
244 systemd-cgls, systemd-cgtop, systemd-coredumpctl, systemd-delta,
245 systemd-detect-virt, systemd-inhibit, systemd-machine-id-setup,
246 systemd-notify, systemd-nspawn, systemd-run, systemd-stdio-bridge
247 (link to systemd-bus-proxyd), systemd-tmpfiles,
248 systemd-tty-ask-password-agent, telinit (link to systemctl),
249 timedatectl, udevadm</seg>
250 <seg>libnss_myhostname.so, libsystemd.so, libudev.so</seg>
251 <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
252 /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
253 /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
254 /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d,
255 /usr/lib/sysctl.d, /usr/lib/systemd,
256 /usr/share/doc-systemd-&systemd-version;, /usr/share/systemd,
257 /usr/share/zsh, /var/lib/systemd</seg>
258 </seglistitem>
259 </segmentedlist>
260
261 <variablelist>
262 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
263 <?dbfo list-presentation="list"?>
264 <?dbhtml list-presentation="table"?>
265
266 <varlistentry id="bootctl">
267 <term><command>bootctl</command></term>
268 <listitem>
269 <para>Controls the firmware and boot manager settings</para>
270 <indexterm zone="ch-system-systemd bootctl">
271 <primary sortas="b-bootctl">bootctl</primary>
272 </indexterm>
273 </listitem>
274 </varlistentry>
275
276 <varlistentry id="busctl">
277 <term><command>busctl</command></term>
278 <listitem>
279 <para>Introspects and monitors the D-Bus bus</para>
280 <indexterm zone="ch-system-systemd busctl">
281 <primary sortas="b-busctl">busctl</primary>
282 </indexterm>
283 </listitem>
284 </varlistentry>
285
286 <varlistentry id="halt">
287 <term><command>halt</command></term>
288 <listitem>
289 <para>Halts, powers off, or reboots the machine</para>
290 <indexterm zone="ch-system-systemd halt">
291 <primary sortas="b-halt">halt</primary>
292 </indexterm>
293 </listitem>
294 </varlistentry>
295
296 <varlistentry id="hostnamectl">
297 <term><command>hostnamectl</command></term>
298 <listitem>
299 <para>Controls the system hostname</para>
300 <indexterm zone="ch-system-systemd hostnamectl">
301 <primary sortas="b-hostnamectl">hostnamectl</primary>
302 </indexterm>
303 </listitem>
304 </varlistentry>
305
306 <varlistentry id="init">
307 <term><command>init</command></term>
308 <listitem>
309 <para>systemd system and service manager</para>
310 <indexterm zone="ch-system-systemd init">
311 <primary sortas="b-init">init</primary>
312 </indexterm>
313 </listitem>
314 </varlistentry>
315
316 <varlistentry id="journalctl">
317 <term><command>journalctl</command></term>
318 <listitem>
319 <para>Queries the systemd journal</para>
320 <indexterm zone="ch-system-systemd journalctl">
321 <primary sortas="b-journalctl">journalctl</primary>
322 </indexterm>
323 </listitem>
324 </varlistentry>
325
326 <varlistentry id="kernel-install">
327 <term><command>kernel-install</command></term>
328 <listitem>
329 <para>Adds and removes kernel and initramfs images to and from
330 <filename class="directory">/boot</filename></para>
331 <indexterm zone="ch-system-systemd kernel-install">
332 <primary sortas="b-kernel-install">kernel-install</primary>
333 </indexterm>
334 </listitem>
335 </varlistentry>
336
337 <varlistentry id="localectl">
338 <term><command>localectl</command></term>
339 <listitem>
340 <para>Controls the system locale and keyboard layout settings</para>
341 <indexterm zone="ch-system-systemd localectl">
342 <primary sortas="b-localectl">localectl</primary>
343 </indexterm>
344 </listitem>
345 </varlistentry>
346
347 <varlistentry id="loginctl">
348 <term><command>loginctl</command></term>
349 <listitem>
350 <para>Controls the systemd login manager</para>
351 <indexterm zone="ch-system-systemd loginctl">
352 <primary sortas="b-loginctl">loginctl</primary>
353 </indexterm>
354 </listitem>
355 </varlistentry>
356
357 <varlistentry id="machinectl">
358 <term><command>machinectl</command></term>
359 <listitem>
360 <para>Controls the systemd machine manager</para>
361 <indexterm zone="ch-system-systemd machinectl">
362 <primary sortas="b-machinectl">machinectl</primary>
363 </indexterm>
364 </listitem>
365 </varlistentry>
366
367 <varlistentry id="poweroff">
368 <term><command>poweroff</command></term>
369 <listitem>
370 <para>Halts, powers off, or reboots the machine</para>
371 <indexterm zone="ch-system-systemd poweroff">
372 <primary sortas="b-poweroff">poweroff</primary>
373 </indexterm>
374 </listitem>
375 </varlistentry>
376
377 <varlistentry id="reboot">
378 <term><command>reboot</command></term>
379 <listitem>
380 <para>Halts, powers off, or reboots the machine</para>
381 <indexterm zone="ch-system-systemd reboot">
382 <primary sortas="b-reboot">reboot</primary>
383 </indexterm>
384 </listitem>
385 </varlistentry>
386
387 <varlistentry id="runlevel">
388 <term><command>runlevel</command></term>
389 <listitem>
390 <para>Prints previous and current SysV runlevel</para>
391 <indexterm zone="ch-system-systemd runlevel">
392 <primary sortas="b-runlevel">runlevel</primary>
393 </indexterm>
394 </listitem>
395 </varlistentry>
396
397 <varlistentry id="shutdown">
398 <term><command>shutdown</command></term>
399 <listitem>
400 <para>Halts, powers off, or reboots the machine</para>
401 <indexterm zone="ch-system-systemd shutdown">
402 <primary sortas="b-shutdown">shutdown</primary>
403 </indexterm>
404 </listitem>
405 </varlistentry>
406
407 <varlistentry id="systemctl">
408 <term><command>systemctl</command></term>
409 <listitem>
410 <para>Control the systemd system and service manager</para>
411 <indexterm zone="ch-system-systemd systemctl">
412 <primary sortas="b-systemctl">systemctl</primary>
413 </indexterm>
414 </listitem>
415 </varlistentry>
416
417 <varlistentry id="systemd">
418 <term><command>systemd</command></term>
419 <listitem>
420 <para>System and service manager for Linux</para>
421 <indexterm zone="ch-system-systemd systemd">
422 <primary sortas="b-systemd">systemd</primary>
423 </indexterm>
424 </listitem>
425 </varlistentry>
426
427 <varlistentry id="systemd-analyze">
428 <term><command>systemd-analyze</command></term>
429 <listitem>
430 <para>Analyzes system boot-up permformance</para>
431 <indexterm zone="ch-system-systemd systemd-analyze">
432 <primary sortas="b-systemd-analyze">systemd-analyze</primary>
433 </indexterm>
434 </listitem>
435 </varlistentry>
436
437 <varlistentry id="systemd-ask-password">
438 <term><command>systemd-ask-password</command></term>
439 <listitem>
440 <para>Queries the user for a system passphrase, via the
441 TTY or an UI agent.</para>
442 <indexterm zone="ch-system-systemd systemd-ask-password">
443 <primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
444 </indexterm>
445 </listitem>
446 </varlistentry>
447
448 <varlistentry id="systemd-cat">
449 <term><command>systemd-cat</command></term>
450 <listitem>
451 <para>Connects a pipeline or program's output with the journal</para>
452 <indexterm zone="ch-system-systemd systemd-cat">
453 <primary sortas="b-systemd-cat">systemd-cat</primary>
454 </indexterm>
455 </listitem>
456 </varlistentry>
457
458 <varlistentry id="systemd-cgls">
459 <term><command>systemd-cgls</command></term>
460 <listitem>
461 <para>Recursively shows control group contents</para>
462 <indexterm zone="ch-system-systemd systemd-cgls">
463 <primary sortas="b-systemd-cgls">systemd-cgls</primary>
464 </indexterm>
465 </listitem>
466 </varlistentry>
467
468 <varlistentry id="systemd-cgtop">
469 <term><command>systemd-cgtop</command></term>
470 <listitem>
471 <para>Shows top control groups by resource usage</para>
472 <indexterm zone="ch-system-systemd systemd-cgtop">
473 <primary sortas="b-systemd-cgtop">systemd-cgtop</primary>
474 </indexterm>
475 </listitem>
476 </varlistentry>
477
478 <varlistentry id="systemd-coredumpctl">
479 <term><command>systemd-coredumpctl</command></term>
480 <listitem>
481 <para>Retrieves coredumps from the journal</para>
482 <indexterm zone="ch-system-systemd systemd-coredumpctl">
483 <primary sortas="b-systemd-coredumpctl">systemd-coredumpctl</primary>
484 </indexterm>
485 </listitem>
486 </varlistentry>
487
488 <varlistentry id="systemd-delta">
489 <term><command>systemd-delta</command></term>
490 <listitem>
491 <para>Finds overridden configuration files</para>
492 <indexterm zone="ch-system-systemd systemd-delta">
493 <primary sortas="b-systemd-delta">systemd-delta</primary>
494 </indexterm>
495 </listitem>
496 </varlistentry>
497
498 <varlistentry id="systemd-detect-virt">
499 <term><command>systemd-detect-virt</command></term>
500 <listitem>
501 <para>Detects execution in a virtual environment</para>
502 <indexterm zone="ch-system-systemd systemd-detect-virt">
503 <primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary>
504 </indexterm>
505 </listitem>
506 </varlistentry>
507
508 <varlistentry id="systemd-inhibit">
509 <term><command>systemd-inhibit</command></term>
510 <listitem>
511 <para>Executes a program with an inhibition lock taken</para>
512 <indexterm zone="ch-system-systemd systemd-inhibit">
513 <primary sortas="b-systemd-inhibit">systemd-inhibit</primary>
514 </indexterm>
515 </listitem>
516 </varlistentry>
517
518 <varlistentry id="systemd-machine-id-setup">
519 <term><command>systemd-machine-id-setup</command></term>
520 <listitem>
521 <para>Initializes the machine ID in
522 <filename>/etc/machine-id</filename></para>
523 <indexterm zone="ch-system-systemd systemd-machine-id-setup">
524 <primary sortas="b-systemd-machine-id-setup">systemd-machine-id-setup</primary>
525 </indexterm>
526 </listitem>
527 </varlistentry>
528
529 <varlistentry id="systemd-notify">
530 <term><command>systemd-notify</command></term>
531 <listitem>
532 <para>Notifies init system about start-up completion and other daemon
533 status changes</para>
534 <indexterm zone="ch-system-systemd systemd-notify">
535 <primary sortas="b-systemd-notify">systemd-notify</primary>
536 </indexterm>
537 </listitem>
538 </varlistentry>
539
540 <varlistentry id="systemd-nspawn">
541 <term><command>systemd-nspawn</command></term>
542 <listitem>
543 <para>Spawns a namespace container for debugging, testing, and
544 building</para>
545 <indexterm zone="ch-system-systemd systemd-nspawn">
546 <primary sortas="b-systemd-nspawn">systemd-nspawn</primary>
547 </indexterm>
548 </listitem>
549 </varlistentry>
550
551 <varlistentry id="systemd-run">
552 <term><command>systemd-run</command></term>
553 <listitem>
554 <para>Runs programs in transient scope or service units</para>
555 <indexterm zone="ch-system-systemd systemd-run">
556 <primary sortas="b-systemd-run">systemd-run</primary>
557 </indexterm>
558 </listitem>
559 </varlistentry>
560
561 <varlistentry id="systemd-stdio-bridge">
562 <term><command>systemd-stdio-bridge</command></term>
563 <listitem>
564 <para>Connects stdio or a socket to a given bus address</para>
565 <indexterm zone="ch-system-systemd systemd-stdio-bridge">
566 <primary sortas="b-systemd-stdio-bridge">systemd-stdio-bridge</primary>
567 </indexterm>
568 </listitem>
569 </varlistentry>
570
571 <varlistentry id="systemd-tmpfiles">
572 <term><command>systemd-tmpfiles</command></term>
573 <listitem>
574 <para>Creates, deletes, and cleans up volatile and temporary files</para>
575 <indexterm zone="ch-system-systemd systemd-tmpfiles">
576 <primary sortas="b-systemd-tmpfiles">systemd-tmpfiles</primary>
577 </indexterm>
578 </listitem>
579 </varlistentry>
580
581 <varlistentry id="systemd-tty-ask-password-agent">
582 <term><command>systemd-tty-ask-password-agent</command></term>
583 <listitem>
584 <para>Process system password requests</para>
585 <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
586 <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
587 </indexterm>
588 </listitem>
589 </varlistentry>
590
591 <varlistentry id="telinit">
592 <term><command>telinit</command></term>
593 <listitem>
594 <para>Tells <command>init</command> which run-level to change to</para>
595 <indexterm zone="ch-system-systemd telinit">
596 <primary sortas="b-telinit">telinit</primary>
597 </indexterm>
598 </listitem>
599 </varlistentry>
600
601 <varlistentry id="timedatectl">
602 <term><command>timedatectl</command></term>
603 <listitem>
604 <para>Controls the system time and date</para>
605 <indexterm zone="ch-system-systemd timedatectl">
606 <primary sortas="b-timedatectl">timedatectl</primary>
607 </indexterm>
608 </listitem>
609 </varlistentry>
610
611 <varlistentry id="udevadm">
612 <term><command>udevadm</command></term>
613 <listitem>
614 <para>Udev management tool</para>
615 <indexterm zone="ch-system-systemd udevadm">
616 <primary sortas="b-udevadm">udevadm</primary>
617 </indexterm>
618 </listitem>
619 </varlistentry>
620
621 <varlistentry id="libnss_myhostname">
622 <term><filename class="libraryfile">libnss_myhostname</filename></term>
623 <listitem>
624 <para>Plugin for the GNU Name Service Switch (NSS) functionality
625 of Glibc, provding hostname resolution for the locally configured
626 system hostname</para>
627 <indexterm zone="ch-system-systemd libnss_myhostname">
628 <primary sortas="c-libnss_myhostname">libnss_myhostname</primary>
629 </indexterm>
630 </listitem>
631 </varlistentry>
632
633 <varlistentry id="libsystemd">
634 <term><filename class="libraryfile">libsystemd</filename></term>
635 <listitem>
636 <para>Support library for systemd</para>
637 <indexterm zone="ch-system-systemd libsystemd">
638 <primary sortas="c-libsystemd">libsystemd</primary>
639 </indexterm>
640 </listitem>
641 </varlistentry>
642
643 <varlistentry id="libudev">
644 <term><filename class="libraryfile">libudev</filename></term>
645 <listitem>
646 <para>A library interface to Udev device information.</para>
647 <indexterm zone="ch-system-systemd libudev">
648 <primary sortas="c-libudev">libudev</primary>
649 </indexterm>
650 </listitem>
651 </varlistentry>
652
653 </variablelist>
654
655 </sect2>
656
657</sect1>
Note: See TracBrowser for help on using the repository browser.