source: chapter06/systemd.xml@ 58c8823

7.5-systemd 7.6-systemd 7.7-systemd 7.8-systemd 7.9-systemd
Last change on this file since 58c8823 was 58c8823, checked in by Krejzi <krejzi@…>, 10 years ago

Random fixes.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd/BOOK@10478 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 22.9 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
8<sect1 id="ch-system-systemd" role="wrap">
9 <?dbhtml filename="systemd.html"?>
10
11 <sect1info condition="script">
12 <productname>systemd</productname>
13 <productnumber>&systemd-version;</productnumber>
14 <address>&systemd-url;</address>
15 </sect1info>
16
17 <title>Systemd-&systemd-version;</title>
18
19 <indexterm zone="ch-system-systemd">
20 <primary sortas="a-Systemd">Systemd</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Systemd package contains programs for controlling the startup,
27 running, and shutdown of the system.</para>
28
29 <segmentedlist>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
32
33 <seglistitem>
34 <seg>&systemd-ch6-sbu;</seg>
35 <seg>&systemd-ch6-du;</seg>
36 </seglistitem>
37 </segmentedlist>
38 </sect2>
39
40 <sect2 role="installation">
41 <title>Installation of Systemd</title>
42
43 <para>First, create a file to allow Systemd to build when using Util-Linux
44 built in Chapter 5:</para>
45
46<screen><userinput remap="pre">cat &gt; config.cache &lt;&lt; "EOF"
47<literal>KILL=/bin/kill
48HAVE_BLKID=1
49BLKID_LIBS="-lblkid"
50BLKID_CFLAGS="-I/tools/include/blkid"</literal>
51EOF</userinput></screen>
52
53 <para>Aditionally, fix a build error when using Util-Linux built in
54 Chapter 5:</para>
55
56<screen><userinput remap="pre">sed -i "s:blkid/::" src/udev/udev-builtin-blkid.c</userinput></screen>
57
58 <para>Prepare Systemd for compilation:</para>
59
60<screen><userinput remap="configure">./configure --prefix=/usr \
61 --sysconfdir=/etc \
62 --localstatedir=/var \
63 --docdir=/usr/share/doc/systemd-&systemd-version; \
64 --config-cache \
65 --with-rootprefix= \
66 --with-rootlibdir=/lib \
67 --enable-split-usr \
68 --disable-gudev \
69 --without-python</userinput></screen>
70
71 <variablelist>
72 <title>The meaning of the configure options:</title>
73
74 <varlistentry>
75 <term><parameter>--config-cache</parameter></term>
76 <listitem>
77 <para>This switch tells the build system to use
78 the <filename>config.cache</filename> file which
79 was created earlier.</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-gudev --without-python</parameter></term>
103 <listitem>
104 <para>These switches disable optional features because
105 LFS does not provide their dependencies.</para>
106 </listitem>
107 </varlistentry>
108
109 </variablelist>
110
111 <para>Compile the package:</para>
112
113<screen><userinput remap="make">make LIBRARY_PATH=/tools/lib</userinput></screen>
114
115 <para>The package comes with a testsuite, but it doesn't work in
116 chroot. It needs to be run from a system booted using Systemd.</para>
117
118 <para>First prevent a broken test case from running:</para>
119
120<screen><userinput remap="test">sed -i s:test/udev-test.pl::g Makefile</userinput></screen>
121
122 <para>To test the results, issue:</para>
123
124<screen><userinput remap="test">make check</userinput></screen>
125
126 <para>Install the package:</para>
127
128<screen><userinput remap="install">make LD_LIBRARY_PATH=/tools/lib install</userinput></screen>
129
130 <para>Install manual pages which are shipped in the tarball, but were
131 not installed by install process:</para>
132
133<screen><userinput remap="install">for cat in 1 3 5 7 8
134do
135 install -v -m644 man/*.${cat} /usr/share/man/man${cat}
136done</userinput></screen>
137
138 <para>Move NSS myhostname library to <filename
139 class="directory">/lib</filename>:</para>
140
141<screen><userinput remap="install">mv -v /usr/lib/libnss_myhostname.so.2 /lib</userinput></screen>
142
143 <para>Create the Sysvinit compatibility symlinks, so Systemd is used
144 as the default init system:</para>
145
146<screen><userinput remap="install">for tool in runlevel reboot shutdown poweroff halt telinit; do
147 ln -sfv ../bin/systemctl /sbin/${tool}
148done
149ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
150
151 <para>Remove a reference to a non-existent group:</para>
152
153<screen><userinput remap="install">sed -i "s@0775 root lock@0755 root root@g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
154
155 <para>Create the <filename>/etc/machine-id</filename> file needed by
156 Journald:</para>
157
158<screen><userinput remap="install">systemd-machine-id-setup</userinput></screen>
159
160 </sect2>
161
162 <sect2 id="contents-systemd" role="content">
163 <title>Contents of Systemd</title>
164
165 <segmentedlist>
166 <segtitle>Installed programs</segtitle>
167 <segtitle>Installed libraries</segtitle>
168 <segtitle>Installed directories</segtitle>
169
170 <seglistitem>
171 <seg>bootctl, halt, hostnamectl, init, journalctl, kernel-install, localectl,
172 loginctl, machinectl, poweroff, reboot, runlevel, shutdown, systemctl,
173 systemd-analyze, systemd-ask-password, systemd-cat, systemd-cgls, systemd-cgtop,
174 systemd-coredumpctl, systemd-delta, systemd-detect-virt, systemd-inhibit,
175 systemd-machine-id-setup, systemd-notify, systemd-nspawn, systemd-run,
176 systemd-stdio-bridge, systemd-tmpfiles, systemd-tty-ask-password-agent, telinit,
177 timedatectl, and udevadm</seg>
178 <seg>libnss_myhostname.so.2, libsystemd-daemon.so, libsystemd-id128.so,
179 libsystemd-journal.so, libsystemd-login.so, libudev.so</seg>
180 <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
181 /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
182 /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
183 /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d, /usr/lib/rpm,
184 /usr/lib/sysctl.d, /usr/lib/systemd, /usr/lib/tmpfiles.d,
185 /usr/share/doc/systemd-&systemd-version;, /usr/share/systemd,
186 /var/lib/systemd, /var/log/journal</seg>
187 </seglistitem>
188 </segmentedlist>
189
190 <variablelist>
191 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
192 <?dbfo list-presentation="list"?>
193 <?dbhtml list-presentation="table"?>
194
195<!-- <varlistentry id="bootctl">
196 <term><command>bootctl</command></term>
197 <listitem>
198 <para></para>
199 <indexterm zone="ch-system-systemd bootctl">
200 <primary sortas="b-bootctl">bootctl</primary>
201 </indexterm>
202 </listitem>
203 </varlistentry> -->
204
205 <varlistentry id="halt">
206 <term><command>halt</command></term>
207 <listitem>
208 <para>Normally invokes <command>shutdown</command> with the
209 <parameter>-h</parameter> option, except when already in run-level 0,
210 then it tells the kernel to halt the system; it notes in the
211 file <filename>/var/log/wtmp</filename> that the system is being
212 brought down.</para>
213 <indexterm zone="ch-system-systemd halt">
214 <primary sortas="b-halt">halt</primary>
215 </indexterm>
216 </listitem>
217 </varlistentry>
218
219 <varlistentry id="hostnamectl">
220 <term><command>hostnamectl</command></term>
221 <listitem>
222 <para>used to query and change the system hostname and related
223 settings.</para>
224 <indexterm zone="ch-system-systemd hostnamectl">
225 <primary sortas="b-hostnamectl">hostnamectl</primary>
226 </indexterm>
227 </listitem>
228 </varlistentry>
229
230 <varlistentry id="init">
231 <term><command>init</command></term>
232 <listitem>
233 <para>The first process to be started when the kernel has initialized
234 the hardware which takes over the boot process and starts all the
235 proceses it is instructed to.</para>
236 <indexterm zone="ch-system-systemd init">
237 <primary sortas="b-init">init</primary>
238 </indexterm>
239 </listitem>
240 </varlistentry>
241
242 <varlistentry id="journalctl">
243 <term><command>journalctl</command></term>
244 <listitem>
245 <para>used to query the contents of the Systemd Journal.</para>
246 <indexterm zone="ch-system-systemd journalctl">
247 <primary sortas="b-journalctl">journalctl</primary>
248 </indexterm>
249 </listitem>
250 </varlistentry>
251
252 <varlistentry id="kernel-install">
253 <term><command>kernel-install</command></term>
254 <listitem>
255 <para>used to add and remove kernel and initramfs images to and
256 from /boot.</para>
257 <indexterm zone="ch-system-systemd kernel-install">
258 <primary sortas="b-kernel-install">kernel-install</primary>
259 </indexterm>
260 </listitem>
261 </varlistentry>
262
263 <varlistentry id="localectl">
264 <term><command>localectl</command></term>
265 <listitem>
266 <para>used to query and change the system locale and keyboard layout
267 settings.</para>
268 <indexterm zone="ch-system-systemd localectl">
269 <primary sortas="b-localectl">localectl</primary>
270 </indexterm>
271 </listitem>
272 </varlistentry>
273
274 <varlistentry id="loginctl">
275 <term><command>loginctl</command></term>
276 <listitem>
277 <para>used to introspect and control the state of the Systemd Login
278 Manager.</para>
279 <indexterm zone="ch-system-systemd loginctl">
280 <primary sortas="b-loginctl">loginctl</primary>
281 </indexterm>
282 </listitem>
283 </varlistentry>
284
285 <varlistentry id="machinectl">
286 <term><command>machinectl</command></term>
287 <listitem>
288 <para>used to introspect and control the state of the Systemd Virtual
289 Machine and Container Registration Manager</para>
290 <indexterm zone="ch-system-systemd machinectl">
291 <primary sortas="b-machinectl">machinectl</primary>
292 </indexterm>
293 </listitem>
294 </varlistentry>
295
296 <varlistentry id="poweroff">
297 <term><command>poweroff</command></term>
298 <listitem>
299 <para>Tells the kernel to halt the system and switch off the computer
300 (see <command>halt</command>).</para>
301 <indexterm zone="ch-system-systemd poweroff">
302 <primary sortas="b-poweroff">poweroff</primary>
303 </indexterm>
304 </listitem>
305 </varlistentry>
306
307 <varlistentry id="reboot">
308 <term><command>reboot</command></term>
309 <listitem>
310 <para>Tells the kernel to reboot the system (see
311 <command>halt</command>).</para>
312 <indexterm zone="ch-system-systemd reboot">
313 <primary sortas="b-reboot">reboot</primary>
314 </indexterm>
315 </listitem>
316 </varlistentry>
317
318 <varlistentry id="runlevel">
319 <term><command>runlevel</command></term>
320 <listitem>
321 <para>Reports the previous and the current run-level, as noted in the
322 last run-level record in <filename>/var/run/utmp</filename>.</para>
323 <indexterm zone="ch-system-systemd runlevel">
324 <primary sortas="b-runlevel">runlevel</primary>
325 </indexterm>
326 </listitem>
327 </varlistentry>
328
329 <varlistentry id="shutdown">
330 <term><command>shutdown</command></term>
331 <listitem>
332 <para>Brings the system down in a secure way, signaling all processes
333 and notifying all logged-in users.</para>
334 <indexterm zone="ch-system-systemd shutdown">
335 <primary sortas="b-shutdown">shutdown</primary>
336 </indexterm>
337 </listitem>
338 </varlistentry>
339
340 <varlistentry id="systemctl">
341 <term><command>systemctl</command></term>
342 <listitem>
343 <para>used to introspect and control the state of the Systemd system and
344 service manager.</para>
345 <indexterm zone="ch-system-systemd systemctl">
346 <primary sortas="b-systemctl">systemctl</primary>
347 </indexterm>
348 </listitem>
349 </varlistentry>
350
351 <varlistentry id="systemd-analyze">
352 <term><command>systemd-analyze</command></term>
353 <listitem>
354 <para>used to determine system boot-up performance of the current boot.
355 </para>
356 <indexterm zone="ch-system-systemd systemd-analyze">
357 <primary sortas="b-systemd-analyze">systemd-analyze</primary>
358 </indexterm>
359 </listitem>
360 </varlistentry>
361
362 <varlistentry id="systemd-ask-password">
363 <term><command>systemd-ask-password</command></term>
364 <listitem>
365 <para>used to query a system password or passphrase from the user, using a
366 question message specified on the command line.</para>
367 <indexterm zone="ch-system-systemd systemd-ask-password">
368 <primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
369 </indexterm>
370 </listitem>
371 </varlistentry>
372
373 <varlistentry id="systemd-cat">
374 <term><command>systemd-cat</command></term>
375 <listitem>
376 <para>used to connect STDOUT and STDERR of a process with the Journal.
377 </para>
378 <indexterm zone="ch-system-systemd systemd-cat">
379 <primary sortas="b-systemd-cat">systemd-cat</primary>
380 </indexterm>
381 </listitem>
382 </varlistentry>
383
384 <varlistentry id="systemd-cgls">
385 <term><command>systemd-cgls</command></term>
386 <listitem>
387 <para>recursively shows the contents of the selected Linux control group
388 hierarchy in a tree.</para>
389 <indexterm zone="ch-system-systemd systemd-cgls">
390 <primary sortas="b-systemd-cgls">systemd-cgls</primary>
391 </indexterm>
392 </listitem>
393 </varlistentry>
394
395 <varlistentry id="systemd-cgtop">
396 <term><command>systemd-cgtop</command></term>
397 <listitem>
398 <para>shows the top control groups of the local Linux control group hierarchy,
399 ordered by their CPU, memory and disk I/O load.</para>
400 <indexterm zone="ch-system-systemd systemd-cgtop">
401 <primary sortas="b-systemd-cgtop">systemd-cgtop</primary>
402 </indexterm>
403 </listitem>
404 </varlistentry>
405
406 <varlistentry id="systemd-coredumpctl">
407 <term><command>systemd-coredumpctl</command></term>
408 <listitem>
409 <para>used to retrieve coredumps from the Systemd Journal</para>
410 <indexterm zone="ch-system-systemd systemd-coredumpctl">
411 <primary sortas="b-systemd-coredumpctl">systemd-coredumpctl</primary>
412 </indexterm>
413 </listitem>
414 </varlistentry>
415
416 <varlistentry id="systemd-delta">
417 <term><command>systemd-delta</command></term>
418 <listitem>
419 <para>used to identify and compare configuration files in
420 <filename class="directory">/etc</filename> that override default
421 counterparts in <filename class="directory">/usr</filename>.</para>
422 <indexterm zone="ch-system-systemd systemd-delta">
423 <primary sortas="b-systemd-delta">systemd-delta</primary>
424 </indexterm>
425 </listitem>
426 </varlistentry>
427
428 <varlistentry id="systemd-detect-virt">
429 <term><command>systemd-detect-virt</command></term>
430 <listitem>
431 <para>detects execution in a virtualized environment.</para>
432 <indexterm zone="ch-system-systemd systemd-detect-virt">
433 <primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary>
434 </indexterm>
435 </listitem>
436 </varlistentry>
437
438 <varlistentry id="systemd-inhibit">
439 <term><command>systemd-inhibit</command></term>
440 <listitem>
441 <para>used to execute a program with a shutdown, sleep or idle inhibitor lock
442 taken.</para>
443 <indexterm zone="ch-system-systemd systemd-inhibit">
444 <primary sortas="b-systemd-inhibit">systemd-inhibit</primary>
445 </indexterm>
446 </listitem>
447 </varlistentry>
448
449 <varlistentry id="systemd-machine-id-setup">
450 <term><command>systemd-machine-id-setup</command></term>
451 <listitem>
452 <para>used by system installer tools to initialize the machine ID stored in
453 <filename>/etc/machine-id</filename> at install time with a randomly
454 generated ID.</para>
455 <indexterm zone="ch-system-systemd systemd-machine-id-setup">
456 <primary sortas="b-systemd-machine-id-setup">systemd-machine-id-setup</primary>
457 </indexterm>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry id="systemd-notify">
462 <term><command>systemd-notify</command></term>
463 <listitem>
464 <para>used by daemon scripts to notify the init system about status changes.
465 </para>
466 <indexterm zone="ch-system-systemd systemd-notify">
467 <primary sortas="b-systemd-notify">systemd-notify</primary>
468 </indexterm>
469 </listitem>
470 </varlistentry>
471
472 <varlistentry id="systemd-nspawn">
473 <term><command>systemd-nspawn</command></term>
474 <listitem>
475 <para>used to run a command or OS in a light-weight namespace container.</para>
476 <indexterm zone="ch-system-systemd systemd-nspawn">
477 <primary sortas="b-systemd-nspawn">systemd-nspawn</primary>
478 </indexterm>
479 </listitem>
480 </varlistentry>
481
482 <varlistentry id="systemd-run">
483 <term><command>systemd-run</command></term>
484 <listitem>
485 <para>used to create and start a transient .service or a .scope unit and
486 run the specified command in it.</para>
487 <indexterm zone="ch-system-systemd systemd-run">
488 <primary sortas="b-systemd-run">systemd-run</primary>
489 </indexterm>
490 </listitem>
491 </varlistentry>
492
493<!-- <varlistentry id="systemd-stdio-bridge">
494 <term><command>systemd-stdio-bridge</command></term>
495 <listitem>
496 <para>To be completed</para>
497 <indexterm zone="ch-system-systemd systemd-stdio-bridge">
498 <primary sortas="b-systemd-stdio-bridge">systemd-stdio-bridge</primary>
499 </indexterm>
500 </listitem>
501 </varlistentry> -->
502
503 <varlistentry id="systemd-tmpfiles">
504 <term><command>systemd-tmpfiles</command></term>
505 <listitem>
506 <para>creates, deletes and cleans up volatile and temporary files and directories,
507 based on the configuration file format and location specified in
508 <filename class="directory">tmpfiles.d</filename> directories.</para>
509 <indexterm zone="ch-system-systemd systemd-tmpfiles">
510 <primary sortas="b-systemd-tmpfiles">systemd-tmpfiles</primary>
511 </indexterm>
512 </listitem>
513 </varlistentry>
514
515 <varlistentry id="systemd-tty-ask-password-agent">
516 <term><command>systemd-tty-ask-password-agent</command></term>
517 <listitem>
518 <para>used to list or process pending Systemd password requests</para>
519 <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
520 <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
521 </indexterm>
522 </listitem>
523 </varlistentry>
524
525 <varlistentry id="telinit">
526 <term><command>telinit</command></term>
527 <listitem>
528 <para>Tells <command>init</command> which run-level to change to.</para>
529 <indexterm zone="ch-system-systemd telinit">
530 <primary sortas="b-telinit">telinit</primary>
531 </indexterm>
532 </listitem>
533 </varlistentry>
534
535 <varlistentry id="timedatectl">
536 <term><command>timedatectl</command></term>
537 <listitem>
538 <para>used to query and change the system clock and its settings.
539 </para>
540 <indexterm zone="ch-system-systemd timedatectl">
541 <primary sortas="b-timedatectl">timedatectl</primary>
542 </indexterm>
543 </listitem>
544 </varlistentry>
545
546 <varlistentry id="udevadm">
547 <term><command>udevadm</command></term>
548 <listitem>
549 <para>Generic Udev administration tool: controls the udevd daemon,
550 provides info from the Udev database, monitors uevents, waits for
551 uevents to finish, tests Udev configuration, and triggers uevents
552 for a given device.</para>
553 <indexterm zone="ch-system-systemd udevadm">
554 <primary sortas="b-udevadm">udevadm</primary>
555 </indexterm>
556 </listitem>
557 </varlistentry>
558
559 <varlistentry id="libsystemd-daemon">
560 <term><filename class="libraryfile">libsystemd-daemon</filename></term>
561 <listitem>
562 <para>Systemd Daemon utility library.</para>
563 <indexterm zone="ch-system-systemd libsystemd-daemon">
564 <primary sortas="c-libsystemd-daemon">libsystemd-daemon</primary>
565 </indexterm>
566 </listitem>
567 </varlistentry>
568
569 <varlistentry id="libsystemd-id128">
570 <term><filename class="libraryfile">libsystemd-id128</filename></term>
571 <listitem>
572 <para>Systemd 128 Bit ID utility library.</para>
573 <indexterm zone="ch-system-systemd libsystemd-id128">
574 <primary sortas="c-libsystemd-id128">libsystemd-id128</primary>
575 </indexterm>
576 </listitem>
577 </varlistentry>
578
579 <varlistentry id="libsystemd-journal">
580 <term><filename class="libraryfile">libsystemd-journal</filename></term>
581 <listitem>
582 <para>Systemd Journal utility library.</para>
583 <indexterm zone="ch-system-systemd libsystemd-journal">
584 <primary sortas="c-libsystemd-journal">libsystemd-journal</primary>
585 </indexterm>
586 </listitem>
587 </varlistentry>
588
589 <varlistentry id="libsystemd-login">
590 <term><filename class="libraryfile">libsystemd-login</filename></term>
591 <listitem>
592 <para>Systemd Login utility library.</para>
593 <indexterm zone="ch-system-systemd libsystemd-login">
594 <primary sortas="c-libsystemd-login">libsystemd-login</primary>
595 </indexterm>
596 </listitem>
597 </varlistentry>
598
599 <varlistentry id="libudev">
600 <term><filename class="libraryfile">libudev</filename></term>
601 <listitem>
602 <para>A library to access Udev device information.</para>
603 <indexterm zone="ch-system-systemd libudev">
604 <primary sortas="c-libudev">libudev</primary>
605 </indexterm>
606 </listitem>
607 </varlistentry>
608
609 </variablelist>
610
611 </sect2>
612
613</sect1>
Note: See TracBrowser for help on using the repository browser.