source: chapter06/systemd.xml@ 323c672

7.5-systemd 7.6-systemd 7.7-systemd 7.8-systemd 7.9-systemd
Last change on this file since 323c672 was 323c672, checked in by Matthew Burgess <matthew@…>, 11 years ago

Improve the tagging and placement of some post install instructions for DBus and Systemd.

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