source: chapter06/systemd.xml@ e4d8c0cd

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

Slightly modify Systemd page.

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

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