source: chapter06/systemd.xml@ b1a51ac1

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

Import new branch

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

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