source: chapter06/systemd.xml@ 720f253

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

Some more fixes.

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

  • Property mode set to 100644
File size: 23.0 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>Remove an unnecessary directory:</para>
144
145<screen><userinput remap="install">rm -rfv /usr/lib/rpm</userinput></screen>
146
147 <para>Create the Sysvinit compatibility symlinks, so Systemd is used
148 as the default init system:</para>
149
150<screen><userinput remap="install">for tool in runlevel reboot shutdown poweroff halt telinit; do
151 ln -sfv ../bin/systemctl /sbin/${tool}
152done
153ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
154
155 <para>Remove a reference to a non-existent group:</para>
156
157<screen><userinput remap="install">sed -i "s@0775 root lock@0755 root root@g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
158
159 <para>Create the <filename>/etc/machine-id</filename> file needed by
160 Journald:</para>
161
162<screen><userinput remap="install">systemd-machine-id-setup</userinput></screen>
163
164 </sect2>
165
166 <sect2 id="contents-systemd" role="content">
167 <title>Contents of Systemd</title>
168
169 <segmentedlist>
170 <segtitle>Installed programs</segtitle>
171 <segtitle>Installed libraries</segtitle>
172 <segtitle>Installed directories</segtitle>
173
174 <seglistitem>
175 <seg>bootctl, halt, hostnamectl, init, journalctl, kernel-install, localectl,
176 loginctl, machinectl, poweroff, reboot, runlevel, shutdown, systemctl,
177 systemd-analyze, systemd-ask-password, systemd-cat, systemd-cgls, systemd-cgtop,
178 systemd-coredumpctl, systemd-delta, systemd-detect-virt, systemd-inhibit,
179 systemd-machine-id-setup, systemd-notify, systemd-nspawn, systemd-run,
180 systemd-stdio-bridge, systemd-tmpfiles, systemd-tty-ask-password-agent, telinit,
181 timedatectl, and udevadm</seg>
182 <seg>libnss_myhostname.so.2, libsystemd-daemon.so, libsystemd-id128.so,
183 libsystemd-journal.so, libsystemd-login.so, libudev.so</seg>
184 <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
185 /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
186 /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
187 /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d,
188 /usr/lib/sysctl.d, /usr/lib/systemd, /usr/lib/tmpfiles.d,
189 /usr/share/doc/systemd-&systemd-version;, /usr/share/systemd,
190 /var/lib/systemd, /var/log/journal</seg>
191 </seglistitem>
192 </segmentedlist>
193
194 <variablelist>
195 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
196 <?dbfo list-presentation="list"?>
197 <?dbhtml list-presentation="table"?>
198
199<!-- <varlistentry id="bootctl">
200 <term><command>bootctl</command></term>
201 <listitem>
202 <para></para>
203 <indexterm zone="ch-system-systemd bootctl">
204 <primary sortas="b-bootctl">bootctl</primary>
205 </indexterm>
206 </listitem>
207 </varlistentry> -->
208
209 <varlistentry id="halt">
210 <term><command>halt</command></term>
211 <listitem>
212 <para>Normally invokes <command>shutdown</command> with the
213 <parameter>-h</parameter> option, except when already in run-level 0,
214 then it tells the kernel to halt the system; it notes in the
215 file <filename>/var/log/wtmp</filename> that the system is being
216 brought down.</para>
217 <indexterm zone="ch-system-systemd halt">
218 <primary sortas="b-halt">halt</primary>
219 </indexterm>
220 </listitem>
221 </varlistentry>
222
223 <varlistentry id="hostnamectl">
224 <term><command>hostnamectl</command></term>
225 <listitem>
226 <para>used to query and change the system hostname and related
227 settings.</para>
228 <indexterm zone="ch-system-systemd hostnamectl">
229 <primary sortas="b-hostnamectl">hostnamectl</primary>
230 </indexterm>
231 </listitem>
232 </varlistentry>
233
234 <varlistentry id="init">
235 <term><command>init</command></term>
236 <listitem>
237 <para>The first process to be started when the kernel has initialized
238 the hardware which takes over the boot process and starts all the
239 proceses it is instructed to.</para>
240 <indexterm zone="ch-system-systemd init">
241 <primary sortas="b-init">init</primary>
242 </indexterm>
243 </listitem>
244 </varlistentry>
245
246 <varlistentry id="journalctl">
247 <term><command>journalctl</command></term>
248 <listitem>
249 <para>used to query the contents of the Systemd Journal.</para>
250 <indexterm zone="ch-system-systemd journalctl">
251 <primary sortas="b-journalctl">journalctl</primary>
252 </indexterm>
253 </listitem>
254 </varlistentry>
255
256 <varlistentry id="kernel-install">
257 <term><command>kernel-install</command></term>
258 <listitem>
259 <para>used to add and remove kernel and initramfs images to and
260 from /boot.</para>
261 <indexterm zone="ch-system-systemd kernel-install">
262 <primary sortas="b-kernel-install">kernel-install</primary>
263 </indexterm>
264 </listitem>
265 </varlistentry>
266
267 <varlistentry id="localectl">
268 <term><command>localectl</command></term>
269 <listitem>
270 <para>used to query and change the system locale and keyboard layout
271 settings.</para>
272 <indexterm zone="ch-system-systemd localectl">
273 <primary sortas="b-localectl">localectl</primary>
274 </indexterm>
275 </listitem>
276 </varlistentry>
277
278 <varlistentry id="loginctl">
279 <term><command>loginctl</command></term>
280 <listitem>
281 <para>used to introspect and control the state of the Systemd Login
282 Manager.</para>
283 <indexterm zone="ch-system-systemd loginctl">
284 <primary sortas="b-loginctl">loginctl</primary>
285 </indexterm>
286 </listitem>
287 </varlistentry>
288
289 <varlistentry id="machinectl">
290 <term><command>machinectl</command></term>
291 <listitem>
292 <para>used to introspect and control the state of the Systemd Virtual
293 Machine and Container Registration Manager</para>
294 <indexterm zone="ch-system-systemd machinectl">
295 <primary sortas="b-machinectl">machinectl</primary>
296 </indexterm>
297 </listitem>
298 </varlistentry>
299
300 <varlistentry id="poweroff">
301 <term><command>poweroff</command></term>
302 <listitem>
303 <para>Tells the kernel to halt the system and switch off the computer
304 (see <command>halt</command>).</para>
305 <indexterm zone="ch-system-systemd poweroff">
306 <primary sortas="b-poweroff">poweroff</primary>
307 </indexterm>
308 </listitem>
309 </varlistentry>
310
311 <varlistentry id="reboot">
312 <term><command>reboot</command></term>
313 <listitem>
314 <para>Tells the kernel to reboot the system (see
315 <command>halt</command>).</para>
316 <indexterm zone="ch-system-systemd reboot">
317 <primary sortas="b-reboot">reboot</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 <varlistentry id="runlevel">
323 <term><command>runlevel</command></term>
324 <listitem>
325 <para>Reports the previous and the current run-level, as noted in the
326 last run-level record in <filename>/var/run/utmp</filename>.</para>
327 <indexterm zone="ch-system-systemd runlevel">
328 <primary sortas="b-runlevel">runlevel</primary>
329 </indexterm>
330 </listitem>
331 </varlistentry>
332
333 <varlistentry id="shutdown">
334 <term><command>shutdown</command></term>
335 <listitem>
336 <para>Brings the system down in a secure way, signaling all processes
337 and notifying all logged-in users.</para>
338 <indexterm zone="ch-system-systemd shutdown">
339 <primary sortas="b-shutdown">shutdown</primary>
340 </indexterm>
341 </listitem>
342 </varlistentry>
343
344 <varlistentry id="systemctl">
345 <term><command>systemctl</command></term>
346 <listitem>
347 <para>used to introspect and control the state of the Systemd system and
348 service manager.</para>
349 <indexterm zone="ch-system-systemd systemctl">
350 <primary sortas="b-systemctl">systemctl</primary>
351 </indexterm>
352 </listitem>
353 </varlistentry>
354
355 <varlistentry id="systemd-analyze">
356 <term><command>systemd-analyze</command></term>
357 <listitem>
358 <para>used to determine system boot-up performance of the current boot.
359 </para>
360 <indexterm zone="ch-system-systemd systemd-analyze">
361 <primary sortas="b-systemd-analyze">systemd-analyze</primary>
362 </indexterm>
363 </listitem>
364 </varlistentry>
365
366 <varlistentry id="systemd-ask-password">
367 <term><command>systemd-ask-password</command></term>
368 <listitem>
369 <para>used to query a system password or passphrase from the user, using a
370 question message specified on the command line.</para>
371 <indexterm zone="ch-system-systemd systemd-ask-password">
372 <primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
373 </indexterm>
374 </listitem>
375 </varlistentry>
376
377 <varlistentry id="systemd-cat">
378 <term><command>systemd-cat</command></term>
379 <listitem>
380 <para>used to connect STDOUT and STDERR of a process with the Journal.
381 </para>
382 <indexterm zone="ch-system-systemd systemd-cat">
383 <primary sortas="b-systemd-cat">systemd-cat</primary>
384 </indexterm>
385 </listitem>
386 </varlistentry>
387
388 <varlistentry id="systemd-cgls">
389 <term><command>systemd-cgls</command></term>
390 <listitem>
391 <para>recursively shows the contents of the selected Linux control group
392 hierarchy in a tree.</para>
393 <indexterm zone="ch-system-systemd systemd-cgls">
394 <primary sortas="b-systemd-cgls">systemd-cgls</primary>
395 </indexterm>
396 </listitem>
397 </varlistentry>
398
399 <varlistentry id="systemd-cgtop">
400 <term><command>systemd-cgtop</command></term>
401 <listitem>
402 <para>shows the top control groups of the local Linux control group hierarchy,
403 ordered by their CPU, memory and disk I/O load.</para>
404 <indexterm zone="ch-system-systemd systemd-cgtop">
405 <primary sortas="b-systemd-cgtop">systemd-cgtop</primary>
406 </indexterm>
407 </listitem>
408 </varlistentry>
409
410 <varlistentry id="systemd-coredumpctl">
411 <term><command>systemd-coredumpctl</command></term>
412 <listitem>
413 <para>used to retrieve coredumps from the Systemd Journal</para>
414 <indexterm zone="ch-system-systemd systemd-coredumpctl">
415 <primary sortas="b-systemd-coredumpctl">systemd-coredumpctl</primary>
416 </indexterm>
417 </listitem>
418 </varlistentry>
419
420 <varlistentry id="systemd-delta">
421 <term><command>systemd-delta</command></term>
422 <listitem>
423 <para>used to identify and compare configuration files in
424 <filename class="directory">/etc</filename> that override default
425 counterparts in <filename class="directory">/usr</filename>.</para>
426 <indexterm zone="ch-system-systemd systemd-delta">
427 <primary sortas="b-systemd-delta">systemd-delta</primary>
428 </indexterm>
429 </listitem>
430 </varlistentry>
431
432 <varlistentry id="systemd-detect-virt">
433 <term><command>systemd-detect-virt</command></term>
434 <listitem>
435 <para>detects execution in a virtualized environment.</para>
436 <indexterm zone="ch-system-systemd systemd-detect-virt">
437 <primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary>
438 </indexterm>
439 </listitem>
440 </varlistentry>
441
442 <varlistentry id="systemd-inhibit">
443 <term><command>systemd-inhibit</command></term>
444 <listitem>
445 <para>used to execute a program with a shutdown, sleep or idle inhibitor lock
446 taken.</para>
447 <indexterm zone="ch-system-systemd systemd-inhibit">
448 <primary sortas="b-systemd-inhibit">systemd-inhibit</primary>
449 </indexterm>
450 </listitem>
451 </varlistentry>
452
453 <varlistentry id="systemd-machine-id-setup">
454 <term><command>systemd-machine-id-setup</command></term>
455 <listitem>
456 <para>used by system installer tools to initialize the machine ID stored in
457 <filename>/etc/machine-id</filename> at install time with a randomly
458 generated ID.</para>
459 <indexterm zone="ch-system-systemd systemd-machine-id-setup">
460 <primary sortas="b-systemd-machine-id-setup">systemd-machine-id-setup</primary>
461 </indexterm>
462 </listitem>
463 </varlistentry>
464
465 <varlistentry id="systemd-notify">
466 <term><command>systemd-notify</command></term>
467 <listitem>
468 <para>used by daemon scripts to notify the init system about status changes.
469 </para>
470 <indexterm zone="ch-system-systemd systemd-notify">
471 <primary sortas="b-systemd-notify">systemd-notify</primary>
472 </indexterm>
473 </listitem>
474 </varlistentry>
475
476 <varlistentry id="systemd-nspawn">
477 <term><command>systemd-nspawn</command></term>
478 <listitem>
479 <para>used to run a command or OS in a light-weight namespace container.</para>
480 <indexterm zone="ch-system-systemd systemd-nspawn">
481 <primary sortas="b-systemd-nspawn">systemd-nspawn</primary>
482 </indexterm>
483 </listitem>
484 </varlistentry>
485
486 <varlistentry id="systemd-run">
487 <term><command>systemd-run</command></term>
488 <listitem>
489 <para>used to create and start a transient .service or a .scope unit and
490 run the specified command in it.</para>
491 <indexterm zone="ch-system-systemd systemd-run">
492 <primary sortas="b-systemd-run">systemd-run</primary>
493 </indexterm>
494 </listitem>
495 </varlistentry>
496
497<!-- <varlistentry id="systemd-stdio-bridge">
498 <term><command>systemd-stdio-bridge</command></term>
499 <listitem>
500 <para>To be completed</para>
501 <indexterm zone="ch-system-systemd systemd-stdio-bridge">
502 <primary sortas="b-systemd-stdio-bridge">systemd-stdio-bridge</primary>
503 </indexterm>
504 </listitem>
505 </varlistentry> -->
506
507 <varlistentry id="systemd-tmpfiles">
508 <term><command>systemd-tmpfiles</command></term>
509 <listitem>
510 <para>creates, deletes and cleans up volatile and temporary files and directories,
511 based on the configuration file format and location specified in
512 <filename class="directory">tmpfiles.d</filename> directories.</para>
513 <indexterm zone="ch-system-systemd systemd-tmpfiles">
514 <primary sortas="b-systemd-tmpfiles">systemd-tmpfiles</primary>
515 </indexterm>
516 </listitem>
517 </varlistentry>
518
519 <varlistentry id="systemd-tty-ask-password-agent">
520 <term><command>systemd-tty-ask-password-agent</command></term>
521 <listitem>
522 <para>used to list or process pending Systemd password requests</para>
523 <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
524 <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
525 </indexterm>
526 </listitem>
527 </varlistentry>
528
529 <varlistentry id="telinit">
530 <term><command>telinit</command></term>
531 <listitem>
532 <para>Tells <command>init</command> which run-level to change to.</para>
533 <indexterm zone="ch-system-systemd telinit">
534 <primary sortas="b-telinit">telinit</primary>
535 </indexterm>
536 </listitem>
537 </varlistentry>
538
539 <varlistentry id="timedatectl">
540 <term><command>timedatectl</command></term>
541 <listitem>
542 <para>used to query and change the system clock and its settings.
543 </para>
544 <indexterm zone="ch-system-systemd timedatectl">
545 <primary sortas="b-timedatectl">timedatectl</primary>
546 </indexterm>
547 </listitem>
548 </varlistentry>
549
550 <varlistentry id="udevadm">
551 <term><command>udevadm</command></term>
552 <listitem>
553 <para>Generic Udev administration tool: controls the udevd daemon,
554 provides info from the Udev database, monitors uevents, waits for
555 uevents to finish, tests Udev configuration, and triggers uevents
556 for a given device.</para>
557 <indexterm zone="ch-system-systemd udevadm">
558 <primary sortas="b-udevadm">udevadm</primary>
559 </indexterm>
560 </listitem>
561 </varlistentry>
562
563 <varlistentry id="libsystemd-daemon">
564 <term><filename class="libraryfile">libsystemd-daemon</filename></term>
565 <listitem>
566 <para>Systemd Daemon utility library.</para>
567 <indexterm zone="ch-system-systemd libsystemd-daemon">
568 <primary sortas="c-libsystemd-daemon">libsystemd-daemon</primary>
569 </indexterm>
570 </listitem>
571 </varlistentry>
572
573 <varlistentry id="libsystemd-id128">
574 <term><filename class="libraryfile">libsystemd-id128</filename></term>
575 <listitem>
576 <para>Systemd 128 Bit ID utility library.</para>
577 <indexterm zone="ch-system-systemd libsystemd-id128">
578 <primary sortas="c-libsystemd-id128">libsystemd-id128</primary>
579 </indexterm>
580 </listitem>
581 </varlistentry>
582
583 <varlistentry id="libsystemd-journal">
584 <term><filename class="libraryfile">libsystemd-journal</filename></term>
585 <listitem>
586 <para>Systemd Journal utility library.</para>
587 <indexterm zone="ch-system-systemd libsystemd-journal">
588 <primary sortas="c-libsystemd-journal">libsystemd-journal</primary>
589 </indexterm>
590 </listitem>
591 </varlistentry>
592
593 <varlistentry id="libsystemd-login">
594 <term><filename class="libraryfile">libsystemd-login</filename></term>
595 <listitem>
596 <para>Systemd Login utility library.</para>
597 <indexterm zone="ch-system-systemd libsystemd-login">
598 <primary sortas="c-libsystemd-login">libsystemd-login</primary>
599 </indexterm>
600 </listitem>
601 </varlistentry>
602
603 <varlistentry id="libudev">
604 <term><filename class="libraryfile">libudev</filename></term>
605 <listitem>
606 <para>A library to access Udev device information.</para>
607 <indexterm zone="ch-system-systemd libudev">
608 <primary sortas="c-libudev">libudev</primary>
609 </indexterm>
610 </listitem>
611 </varlistentry>
612
613 </variablelist>
614
615 </sect2>
616
617</sect1>
Note: See TracBrowser for help on using the repository browser.