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

systemd
Last change on this file since 6716743 was 7cd7f99, checked in by Chris Staub <chris@…>, 9 years ago

Put one configure option per line

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