source: BOOK/final-system/common/systemd.xml @ 479720a

systemd
Last change on this file since 479720a was 479720a, checked in by William Harrington <kb0iic@…>, 7 years ago

Add literal tag around config.cache contents.

  • Property mode set to 100644
File size: 23.3 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">
170            sed -i "s:minix:ext4:g" src/test/test-path-util.c
171            make check</userinput></screen>
172
173    <para os="j">Install the package:</para>
174
175<screen os="k"><userinput>make install</userinput></screen>
176
177    <para os="l">Install documentation files that are not installed by default:</para>
178
179<screen os="m"><userinput>install -v -m644 man/*.html /usr/share/doc/systemd-&systemd-version;</userinput></screen>
180
181    <para os="p">Remove an unnecessary directory:</para>
182
183<screen os="q"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
184
185    <para os="r">Create symlinks for backwards-compatibility with Sysvinit:</para>
186
187<screen os="s"><userinput>for tool in runlevel reboot shutdown poweroff halt telinit; do
188  ln -sfv ../bin/systemctl /sbin/$tool
189done
190ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
191
192  </sect2>
193
194  <sect2 id="conf-systemd" role="configuration">
195    <title>Configuring Systemd</title>
196
197    <indexterm zone="conf-systemd">
198      <primary sortas="a-systemd">systemd</primary>
199    <secondary>configuring</secondary></indexterm>
200
201    <indexterm zone="conf-systemd">
202      <primary sortas="e-/etc/os-release">/etc/os-release</primary>
203    </indexterm>
204
205    <para>Create <filename>/etc/machine-id</filename> which is needed
206    by Journald:</para>
207
208<screen><userinput>systemd-machine-id-setup</userinput></screen>
209
210    <para>Create a file to identify the operating system.
211    <command>systemd</command> will use this file on boot to put information
212    on the screen.</para>
213
214<screen><userinput>cat &gt; /etc/os-release &lt;&lt; "EOF"
215# Begin /etc/os-release
216
217NAME=Cross-LFS
218ID=clfs
219
220PRETTY_NAME=Cross Linux From Scratch
221ANSI_COLOR=0;33
222
223VERSION=&version;
224VERSION_ID=&versionid;
225
226# End /etc/os-release
227EOF</userinput></screen>
228
229  </sect2>
230
231  <sect2 id="contents-systemd" role="content">
232    <title>Contents of Systemd</title>
233
234    <segmentedlist>
235      <segtitle>Installed programs</segtitle>
236      <segtitle>Installed libraries</segtitle>
237      <segtitle>Installed directories</segtitle>
238
239      <seglistitem>
240        <seg>bootctl, busctl, halt (link to systemctl), hostnamectl,
241        init (link to systemd), journalctl, kernel-install, localectl, loginctl,
242        machinectl, poweroff (link to systemctl), reboot (link to systemctl),
243        runlevel (link to systemctl), shutdown (link to systemctl),
244        systemctl, systemd, system-analyze, systemd-ask-password, systemd-cat,
245        systemd-cgls, systemd-cgtop, systemd-coredumpctl, systemd-delta,
246        systemd-detect-virt, systemd-inhibit, systemd-machine-id-setup,
247        systemd-notify, systemd-nspawn, systemd-run, systemd-stdio-bridge
248        (link to systemd-bus-proxyd), systemd-tmpfiles,
249        systemd-tty-ask-password-agent, telinit (link to systemctl),
250        timedatectl, udevadm</seg>
251        <seg>libnss_myhostname.so, libsystemd.so, libudev.so</seg>
252        <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
253        /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
254        /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
255        /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d,
256        /usr/lib/sysctl.d, /usr/lib/systemd,
257        /usr/share/doc-systemd-&systemd-version;, /usr/share/systemd,
258        /usr/share/zsh, /var/lib/systemd</seg>
259      </seglistitem>
260    </segmentedlist>
261
262    <variablelist>
263      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
264      <?dbfo list-presentation="list"?>
265      <?dbhtml list-presentation="table"?>
266
267      <varlistentry id="bootctl">
268        <term><command>bootctl</command></term>
269        <listitem>
270          <para>Controls the firmware and boot manager settings</para>
271          <indexterm zone="ch-system-systemd bootctl">
272            <primary sortas="b-bootctl">bootctl</primary>
273          </indexterm>
274        </listitem>
275      </varlistentry>
276
277      <varlistentry id="busctl">
278        <term><command>busctl</command></term>
279        <listitem>
280          <para>Introspects and monitors the D-Bus bus</para>
281          <indexterm zone="ch-system-systemd busctl">
282            <primary sortas="b-busctl">busctl</primary>
283          </indexterm>
284        </listitem>
285      </varlistentry>
286
287      <varlistentry id="halt">
288        <term><command>halt</command></term>
289        <listitem>
290          <para>Halts, powers off, or reboots the machine</para>
291          <indexterm zone="ch-system-systemd halt">
292            <primary sortas="b-halt">halt</primary>
293          </indexterm>
294        </listitem>
295      </varlistentry>
296
297      <varlistentry id="hostnamectl">
298        <term><command>hostnamectl</command></term>
299        <listitem>
300          <para>Controls the system hostname</para>
301          <indexterm zone="ch-system-systemd hostnamectl">
302            <primary sortas="b-hostnamectl">hostnamectl</primary>
303          </indexterm>
304        </listitem>
305      </varlistentry>
306
307      <varlistentry id="init">
308        <term><command>init</command></term>
309        <listitem>
310          <para>systemd system and service manager</para>
311          <indexterm zone="ch-system-systemd init">
312            <primary sortas="b-init">init</primary>
313          </indexterm>
314        </listitem>
315      </varlistentry>
316
317      <varlistentry id="journalctl">
318        <term><command>journalctl</command></term>
319        <listitem>
320          <para>Queries the systemd journal</para>
321          <indexterm zone="ch-system-systemd journalctl">
322            <primary sortas="b-journalctl">journalctl</primary>
323          </indexterm>
324        </listitem>
325      </varlistentry>
326
327      <varlistentry id="kernel-install">
328        <term><command>kernel-install</command></term>
329        <listitem>
330          <para>Adds and removes kernel and initramfs images to and from
331          <filename class="directory">/boot</filename></para>
332          <indexterm zone="ch-system-systemd kernel-install">
333            <primary sortas="b-kernel-install">kernel-install</primary>
334          </indexterm>
335        </listitem>
336      </varlistentry>
337
338      <varlistentry id="localectl">
339        <term><command>localectl</command></term>
340        <listitem>
341          <para>Controls the system locale and keyboard layout settings</para>
342          <indexterm zone="ch-system-systemd localectl">
343            <primary sortas="b-localectl">localectl</primary>
344          </indexterm>
345        </listitem>
346      </varlistentry>
347
348      <varlistentry id="loginctl">
349        <term><command>loginctl</command></term>
350        <listitem>
351          <para>Controls the systemd login manager</para>
352          <indexterm zone="ch-system-systemd loginctl">
353            <primary sortas="b-loginctl">loginctl</primary>
354          </indexterm>
355        </listitem>
356      </varlistentry>
357
358      <varlistentry id="machinectl">
359        <term><command>machinectl</command></term>
360        <listitem>
361          <para>Controls the systemd machine manager</para>
362          <indexterm zone="ch-system-systemd machinectl">
363            <primary sortas="b-machinectl">machinectl</primary>
364          </indexterm>
365        </listitem>
366      </varlistentry>
367
368      <varlistentry id="poweroff">
369        <term><command>poweroff</command></term>
370        <listitem>
371          <para>Halts, powers off, or reboots the machine</para>
372          <indexterm zone="ch-system-systemd poweroff">
373            <primary sortas="b-poweroff">poweroff</primary>
374          </indexterm>
375        </listitem>
376      </varlistentry>
377
378      <varlistentry id="reboot">
379        <term><command>reboot</command></term>
380        <listitem>
381          <para>Halts, powers off, or reboots the machine</para>
382          <indexterm zone="ch-system-systemd reboot">
383            <primary sortas="b-reboot">reboot</primary>
384          </indexterm>
385        </listitem>
386      </varlistentry>
387
388      <varlistentry id="runlevel">
389        <term><command>runlevel</command></term>
390        <listitem>
391          <para>Prints previous and current SysV runlevel</para>
392          <indexterm zone="ch-system-systemd runlevel">
393            <primary sortas="b-runlevel">runlevel</primary>
394          </indexterm>
395        </listitem>
396      </varlistentry>
397
398      <varlistentry id="shutdown">
399        <term><command>shutdown</command></term>
400        <listitem>
401          <para>Halts, powers off, or reboots the machine</para>
402          <indexterm zone="ch-system-systemd shutdown">
403            <primary sortas="b-shutdown">shutdown</primary>
404          </indexterm>
405        </listitem>
406      </varlistentry>
407
408      <varlistentry id="systemctl">
409        <term><command>systemctl</command></term>
410        <listitem>
411          <para>Control the systemd system and service manager</para>
412          <indexterm zone="ch-system-systemd systemctl">
413            <primary sortas="b-systemctl">systemctl</primary>
414          </indexterm>
415        </listitem>
416      </varlistentry>
417
418      <varlistentry id="systemd">
419        <term><command>systemd</command></term>
420        <listitem>
421          <para>System and service manager for Linux</para>
422          <indexterm zone="ch-system-systemd systemd">
423            <primary sortas="b-systemd">systemd</primary>
424          </indexterm>
425        </listitem>
426      </varlistentry>
427
428      <varlistentry id="systemd-analyze">
429        <term><command>systemd-analyze</command></term>
430        <listitem>
431          <para>Analyzes system boot-up permformance</para>
432          <indexterm zone="ch-system-systemd systemd-analyze">
433            <primary sortas="b-systemd-analyze">systemd-analyze</primary>
434          </indexterm>
435        </listitem>
436      </varlistentry>
437
438      <varlistentry id="systemd-ask-password">
439        <term><command>systemd-ask-password</command></term>
440        <listitem>
441          <para>Queries the user for a system passphrase, via the
442          TTY or an UI agent.</para>
443          <indexterm zone="ch-system-systemd systemd-ask-password">
444            <primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
445          </indexterm>
446        </listitem>
447      </varlistentry>
448
449      <varlistentry id="systemd-cat">
450        <term><command>systemd-cat</command></term>
451        <listitem>
452          <para>Connects a pipeline or program's output with the journal</para>
453          <indexterm zone="ch-system-systemd systemd-cat">
454            <primary sortas="b-systemd-cat">systemd-cat</primary>
455          </indexterm>
456        </listitem>
457      </varlistentry>
458
459      <varlistentry id="systemd-cgls">
460        <term><command>systemd-cgls</command></term>
461        <listitem>
462          <para>Recursively shows control group contents</para>
463          <indexterm zone="ch-system-systemd systemd-cgls">
464            <primary sortas="b-systemd-cgls">systemd-cgls</primary>
465          </indexterm>
466        </listitem>
467      </varlistentry>
468
469      <varlistentry id="systemd-cgtop">
470        <term><command>systemd-cgtop</command></term>
471        <listitem>
472          <para>Shows top control groups by resource usage</para>
473          <indexterm zone="ch-system-systemd systemd-cgtop">
474            <primary sortas="b-systemd-cgtop">systemd-cgtop</primary>
475          </indexterm>
476        </listitem>
477      </varlistentry>
478
479      <varlistentry id="systemd-coredumpctl">
480        <term><command>systemd-coredumpctl</command></term>
481        <listitem>
482          <para>Retrieves coredumps from the journal</para>
483          <indexterm zone="ch-system-systemd systemd-coredumpctl">
484            <primary sortas="b-systemd-coredumpctl">systemd-coredumpctl</primary>
485          </indexterm>
486        </listitem>
487      </varlistentry>
488
489      <varlistentry id="systemd-delta">
490        <term><command>systemd-delta</command></term>
491        <listitem>
492          <para>Finds overridden configuration files</para>
493          <indexterm zone="ch-system-systemd systemd-delta">
494            <primary sortas="b-systemd-delta">systemd-delta</primary>
495          </indexterm>
496        </listitem>
497      </varlistentry>
498
499      <varlistentry id="systemd-detect-virt">
500        <term><command>systemd-detect-virt</command></term>
501        <listitem>
502          <para>Detects execution in a virtual environment</para>
503          <indexterm zone="ch-system-systemd systemd-detect-virt">
504            <primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary>
505          </indexterm>
506        </listitem>
507      </varlistentry>
508
509      <varlistentry id="systemd-inhibit">
510        <term><command>systemd-inhibit</command></term>
511        <listitem>
512          <para>Executes a program with an inhibition lock taken</para>
513          <indexterm zone="ch-system-systemd systemd-inhibit">
514            <primary sortas="b-systemd-inhibit">systemd-inhibit</primary>
515          </indexterm>
516        </listitem>
517      </varlistentry>
518
519      <varlistentry id="systemd-machine-id-setup">
520        <term><command>systemd-machine-id-setup</command></term>
521        <listitem>
522          <para>Initializes the machine ID in
523          <filename>/etc/machine-id</filename></para>
524          <indexterm zone="ch-system-systemd systemd-machine-id-setup">
525            <primary sortas="b-systemd-machine-id-setup">systemd-machine-id-setup</primary>
526          </indexterm>
527        </listitem>
528      </varlistentry>
529
530      <varlistentry id="systemd-notify">
531        <term><command>systemd-notify</command></term>
532        <listitem>
533          <para>Notifies init system about start-up completion and other daemon
534          status changes</para>
535          <indexterm zone="ch-system-systemd systemd-notify">
536            <primary sortas="b-systemd-notify">systemd-notify</primary>
537          </indexterm>
538        </listitem>
539      </varlistentry>
540
541      <varlistentry id="systemd-nspawn">
542        <term><command>systemd-nspawn</command></term>
543        <listitem>
544          <para>Spawns a namespace container for debugging, testing, and
545          building</para>
546          <indexterm zone="ch-system-systemd systemd-nspawn">
547            <primary sortas="b-systemd-nspawn">systemd-nspawn</primary>
548          </indexterm>
549        </listitem>
550      </varlistentry>
551
552      <varlistentry id="systemd-run">
553        <term><command>systemd-run</command></term>
554        <listitem>
555          <para>Runs programs in transient scope or service units</para>
556          <indexterm zone="ch-system-systemd systemd-run">
557            <primary sortas="b-systemd-run">systemd-run</primary>
558          </indexterm>
559        </listitem>
560      </varlistentry>
561
562      <varlistentry id="systemd-stdio-bridge">
563        <term><command>systemd-stdio-bridge</command></term>
564        <listitem>
565          <para>Connects stdio or a socket to a given bus address</para>
566          <indexterm zone="ch-system-systemd systemd-stdio-bridge">
567            <primary sortas="b-systemd-stdio-bridge">systemd-stdio-bridge</primary>
568          </indexterm>
569        </listitem>
570      </varlistentry>
571
572      <varlistentry id="systemd-tmpfiles">
573        <term><command>systemd-tmpfiles</command></term>
574        <listitem>
575          <para>Creates, deletes, and cleans up volatile and temporary files</para>
576          <indexterm zone="ch-system-systemd systemd-tmpfiles">
577            <primary sortas="b-systemd-tmpfiles">systemd-tmpfiles</primary>
578          </indexterm>
579        </listitem>
580      </varlistentry>
581
582      <varlistentry id="systemd-tty-ask-password-agent">
583        <term><command>systemd-tty-ask-password-agent</command></term>
584        <listitem>
585          <para>Process system password requests</para>
586          <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
587            <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
588          </indexterm>
589        </listitem>
590      </varlistentry>
591
592      <varlistentry id="telinit">
593        <term><command>telinit</command></term>
594        <listitem>
595          <para>Tells <command>init</command> which run-level to change to</para>
596          <indexterm zone="ch-system-systemd telinit">
597            <primary sortas="b-telinit">telinit</primary>
598          </indexterm>
599        </listitem>
600      </varlistentry>
601
602      <varlistentry id="timedatectl">
603        <term><command>timedatectl</command></term>
604        <listitem>
605          <para>Controls the system time and date</para>
606          <indexterm zone="ch-system-systemd timedatectl">
607            <primary sortas="b-timedatectl">timedatectl</primary>
608          </indexterm>
609        </listitem>
610      </varlistentry>
611
612      <varlistentry id="udevadm">
613        <term><command>udevadm</command></term>
614        <listitem>
615          <para>Udev management tool</para>
616          <indexterm zone="ch-system-systemd udevadm">
617            <primary sortas="b-udevadm">udevadm</primary>
618          </indexterm>
619        </listitem>
620      </varlistentry>
621
622      <varlistentry id="libnss_myhostname">
623        <term><filename class="libraryfile">libnss_myhostname</filename></term>
624        <listitem>
625          <para>Plugin for the GNU Name Service Switch (NSS) functionality
626          of Glibc, provding hostname resolution for the locally configured
627          system hostname</para>
628          <indexterm zone="ch-system-systemd libnss_myhostname">
629            <primary sortas="c-libnss_myhostname">libnss_myhostname</primary>
630          </indexterm>
631        </listitem>
632      </varlistentry>
633
634      <varlistentry id="libsystemd">
635        <term><filename class="libraryfile">libsystemd</filename></term>
636        <listitem>
637          <para>Support library for systemd</para>
638          <indexterm zone="ch-system-systemd libsystemd">
639            <primary sortas="c-libsystemd">libsystemd</primary>
640          </indexterm>
641        </listitem>
642      </varlistentry>
643
644      <varlistentry id="libudev">
645        <term><filename class="libraryfile">libudev</filename></term>
646        <listitem>
647          <para>A library interface to Udev device information.</para>
648          <indexterm zone="ch-system-systemd libudev">
649            <primary sortas="c-libudev">libudev</primary>
650          </indexterm>
651        </listitem>
652      </varlistentry>
653
654    </variablelist>
655
656  </sect2>
657
658</sect1>
Note: See TracBrowser for help on using the repository browser.