source: chapter06/systemd.xml@ 94f4fb86

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

Misc updates.

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

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