source: BOOK/final-system/common/systemd.xml@ 4c2f1e7

clfs-3.0.0-systemd systemd
Last change on this file since 4c2f1e7 was 4c2f1e7, checked in by Chris Staub <chris@…>, 11 years ago

More updates to systemd installed programs

  • Property mode set to 100644
File size: 22.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<sect1 id="ch-system-systemd" role="wrap">
8 <?dbhtml filename="systemd.html"?>
9
10 <title>Systemd-&systemd-version;</title>
11
12 <indexterm zone="ch-system-systemd">
13 <primary sortas="a-systemd">Systemd</primary>
14 </indexterm>
15
16 <sect2 role="package">
17 <title/>
18
19 <para>The systemd package is a system and service manager for Linux
20 operating systems.</para>
21
22 </sect2>
23
24 <sect2 role="installation">
25 <title>Installation of Systemd</title>
26
27 <para os="p1">Systemd 209 merged several libraries into
28 <filename class="libraryfile">libsystemd</filename>, but some packages
29 that use systemd still expect those separate libraries. Apply a patch
30 to allow backwards compatibility with these packages by
31 installing Pkg-config files for the old libraries:</para>
32
33<screen os="p2"><userinput>patch -Np1 -i ../&systemd-compat-patch;</userinput></screen>
34
35 <para os="s1">Prevent the <filename>Makefile</filename> from trying to run
36 <command>setcap</command> on <command>systemd-detect-virt</command>,
37 which will fail if the kernel or file system does not support extended
38 capabilities:</para>
39
40<screen os="s2"><userinput>sed -i '/virt-install-hook /d' Makefile.in</userinput></screen>
41
42 <para os="s3">The <filename>timesyncd.conf</filename> file contains a
43 reference to a non-existent <filename>timesyncd.conf(5)</filename> man
44 page. Remove that reference to avoid possible confusion:</para>
45
46<screen os="s4"><userinput>sed -i '/timesyncd.conf/d' src/timesync/timesyncd.conf.in</userinput></screen>
47
48 <para os="s5">By default, <command>systemd-fsck</command> will run
49 <filename>/sbin/fsck</filename> with the <option>-l</option> option, which
50 applies an <function>flock</function> on the file system being checked.
51 This can conflict with an <function>flock</function> that
52 systemd itself puts on the file system, which could result in problems
53 booting. <command>fsck</command> will be fixed to avoid this problem in a
54 future release of Util-linux, but for now we will work around the issue by
55 simply preventing <command>systemd-fsck</command> from using <option>-l</option>:</para>
56
57<screen os="s6"><userinput>sed -i '/-l/d' src/fsck/fsck.c</userinput></screen>
58
59 <para os="a">Prepare systemd for compilation:</para>
60
61<screen os="b"><userinput>./configure --prefix=/usr \
62 --sysconfdir=/etc --localstatedir=/var \
63 --libexecdir=/usr/lib --docdir=/usr/share/doc/systemd-&systemd-version; \
64 --with-rootprefix="" --with-rootlibdir=/lib \
65 --enable-split-usr --disable-gudev --with-kbd-loadkeys=/bin/loadkeys \
66 --with-kbd-setfont=/bin/setfont --with-dbuspolicydir=/etc/dbus-1/system.d \
67 --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \
68 --with-dbussessionservicedir=/usr/share/dbus-1/services \
69 --with-dbussystemservicedir=/usr/share/dbus-1/system-services</userinput></screen>
70
71 <variablelist os="c">
72 <title>The meaning of the configure options:</title>
73
74 <varlistentry>
75 <term><parameter>--with-root*</parameter></term>
76 <listitem>
77 <para>These switches ensure that core programs and
78 shared libraries are installed in the subdirectories
79 of the root partition.</para>
80 </listitem>
81 </varlistentry>
82
83 <varlistentry>
84 <term><parameter>--enable-split-usr</parameter></term>
85 <listitem>
86 <para>This switch ensures that systemd will work on
87 systems where /bin, /lib and /sbin directories are not
88 symlinks to their /usr counterparts.</para>
89 </listitem>
90 </varlistentry>
91
92 <varlistentry>
93 <term><parameter>--disable-gudev</parameter></term>
94 <listitem>
95 <para>This switch prevents systemd from building
96 <filename class="libraryfile">libgudev</filename> as it requires
97 Glib, which is not installed in CLFS.</para>
98 </listitem>
99 </varlistentry>
100
101 <varlistentry>
102 <term><parameter>--with-dbus*</parameter></term>
103 <listitem>
104 <para>These switches ensure that D-Bus configuration files get
105 installed to the correct locations.</para>
106 </listitem>
107 </varlistentry>
108 </variablelist>
109
110 <para os="d">Compile the package:</para>
111
112<screen os="e"><userinput>make</userinput></screen>
113
114 <para os="f">Prevent a broken test case from running:</para>
115
116<screen os="g"><userinput remap="test">sed -e "s:test/udev-test.pl::g" \
117 -e "s:test-bus-cleanup\$(EXEEXT) ::g" \
118 -e "s:test-bus-gvariant\$(EXEEXT) ::g" \
119 -i Makefile</userinput></screen>
120
121 <para os="h">To test the results, issue:</para>
122
123<screen os="i"><userinput remap="test">make check</userinput></screen>
124
125 <para os="j">Install the package:</para>
126
127<screen os="k"><userinput>make install</userinput></screen>
128
129 <para os="l">Install documentation files that are not installed by default:</para>
130
131<screen os="m"><userinput>install -v -m644 man/*.html /usr/share/doc/systemd-&systemd-version;</userinput></screen>
132
133 <para os="n">Move NSS myhostname library to <filename class="directory">/lib
134</filename>:</para>
135
136<screen os="o"><userinput>mv -v /usr/lib/libnss_myhostname.so.2 /lib</userinput></screen>
137
138 <para os="p">Remove an unnecessary directory:</para>
139
140<screen os="q"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
141
142 <para os="r">Create symlinks for backwards-compatibility with Sysvinit:</para>
143
144<screen os="s"><userinput>for tool in runlevel reboot shutdown poweroff halt telinit; do
145 ln -sfv ../bin/systemctl /sbin/$tool
146done
147ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
148
149 <para os="t">Modify a configuration file which references a group that
150 doesn't exist:</para>
151
152<screen os="u"><userinput>sed -i "s@root lock@root root@g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
153
154 </sect2>
155
156 <sect2 id="conf-systemd" role="configuration">
157 <title>Configuring Systemd</title>
158
159 <indexterm zone="conf-systemd">
160 <primary sortas="a-systemd">systemd</primary>
161 <secondary>configuring</secondary></indexterm>
162
163 <indexterm zone="conf-systemd">
164 <primary sortas="e-/etc/os-release">/etc/os-release</primary>
165 </indexterm>
166
167 <para>Create <filename>/etc/machine-id</filename> which is needed
168 by Journald:</para>
169
170<screen><userinput>systemd-machine-id-setup</userinput></screen>
171
172 <para>Create a file to identify the operating system.
173 <command>systemd</command> will use this file on boot to put information
174 on the screen.</para>
175
176<screen><userinput>cat &gt; /etc/os-release &lt;&lt; "EOF"
177# Begin /etc/os-release
178
179NAME=Cross-LFS
180ID=clfs
181
182PRETTY_NAME=Cross Linux From Scratch
183ANSI_COLOR=0;33
184
185VERSION=&version;
186VERSION_ID=&versionid;
187
188# End /etc/os-release
189EOF</userinput></screen>
190
191 </sect2>
192
193 <sect2 id="contents-systemd" role="content">
194 <title>Contents of Systemd</title>
195
196 <segmentedlist>
197 <segtitle>Installed programs</segtitle>
198 <segtitle>Installed libraries</segtitle>
199 <segtitle>Installed directories</segtitle>
200
201 <seglistitem>
202 <seg>bootctl, busctl, halt (link to systemctl), hostnamectl,
203 init (link to systemd), journalctl, kernel-install, localectl, loginctl,
204 machinectl, poweroff (link to systemctl), reboot (link to systemctl),
205 runlevel (link to systemctl), shutdown (link to systemctl),
206 systemctl, systemd, system-analyze, systemd-ask-password, systemd-cat,
207 systemd-cgls, systemd-cgtop, systemd-coredumpctl, systemd-delta,
208 systemd-detect-virt, systemd-inhibit, systemd-machine-id-setup,
209 systemd-notify, systemd-nspawn, systemd-run, systemd-stdio-bridge
210 (link to systemd-bus-proxyd), systemd-tmpfiles,
211 systemd-tty-ask-password-agent, telinit (link to systemctl),
212 timedatectl, udevadm</seg>
213 <seg>libnss_myhostname.so, libsystemd.so, libudev.so</seg>
214 <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
215 /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
216 /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
217 /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d,
218 /usr/lib/sysctl.d, /usr/lib/systemd,
219 /usr/share/doc-systemd-&systemd-version;, /usr/share/systemd,
220 /usr/share/zsh, /var/lib/systemd</seg>
221 </seglistitem>
222 </segmentedlist>
223
224 <variablelist>
225 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
226 <?dbfo list-presentation="list"?>
227 <?dbhtml list-presentation="table"?>
228
229 <varlistentry id="bootctl">
230 <term><command>bootctl</command></term>
231 <listitem>
232 <para>Controls the firmware and boot manager settings</para>
233 <indexterm zone="ch-system-systemd bootctl">
234 <primary sortas="b-bootctl">bootctl</primary>
235 </indexterm>
236 </listitem>
237 </varlistentry>
238
239 <varlistentry id="busctl">
240 <term><command>busctl</command></term>
241 <listitem>
242 <para>Introspects and monitors the D-Bus bus</para>
243 <indexterm zone="ch-system-systemd busctl">
244 <primary sortas="b-busctl">busctl</primary>
245 </indexterm>
246 </listitem>
247 </varlistentry>
248
249 <varlistentry id="halt">
250 <term><command>halt</command></term>
251 <listitem>
252 <para>Halts, powers off, or reboots the machine</para>
253 <indexterm zone="ch-system-systemd halt">
254 <primary sortas="b-halt">halt</primary>
255 </indexterm>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry id="hostnamectl">
260 <term><command>hostnamectl</command></term>
261 <listitem>
262 <para>Controls the system hostname</para>
263 <indexterm zone="ch-system-systemd hostnamectl">
264 <primary sortas="b-hostnamectl">hostnamectl</primary>
265 </indexterm>
266 </listitem>
267 </varlistentry>
268
269 <varlistentry id="init">
270 <term><command>init</command></term>
271 <listitem>
272 <para>systemd system and service manager</para>
273 <indexterm zone="ch-system-systemd init">
274 <primary sortas="b-init">init</primary>
275 </indexterm>
276 </listitem>
277 </varlistentry>
278
279 <varlistentry id="journalctl">
280 <term><command>journalctl</command></term>
281 <listitem>
282 <para>Queries the systemd journal</para>
283 <indexterm zone="ch-system-systemd journalctl">
284 <primary sortas="b-journalctl">journalctl</primary>
285 </indexterm>
286 </listitem>
287 </varlistentry>
288
289 <varlistentry id="kernel-install">
290 <term><command>kernel-install</command></term>
291 <listitem>
292 <para>Adds and removes kernel and initramfs images to and from
293 <filename class="directory">/boot</filename></para>
294 <indexterm zone="ch-system-systemd kernel-install">
295 <primary sortas="b-kernel-install">kernel-install</primary>
296 </indexterm>
297 </listitem>
298 </varlistentry>
299
300 <varlistentry id="localectl">
301 <term><command>localectl</command></term>
302 <listitem>
303 <para>Controls the system locale and keyboard layout settings</para>
304 <indexterm zone="ch-system-systemd localectl">
305 <primary sortas="b-localectl">localectl</primary>
306 </indexterm>
307 </listitem>
308 </varlistentry>
309
310 <varlistentry id="loginctl">
311 <term><command>loginctl</command></term>
312 <listitem>
313 <para>Controls the systemd login manager</para>
314 <indexterm zone="ch-system-systemd loginctl">
315 <primary sortas="b-loginctl">loginctl</primary>
316 </indexterm>
317 </listitem>
318 </varlistentry>
319
320 <varlistentry id="machinectl">
321 <term><command>machinectl</command></term>
322 <listitem>
323 <para>Controls the systemd machine manager</para>
324 <indexterm zone="ch-system-systemd machinectl">
325 <primary sortas="b-machinectl">machinectl</primary>
326 </indexterm>
327 </listitem>
328 </varlistentry>
329
330 <varlistentry id="poweroff">
331 <term><command>poweroff</command></term>
332 <listitem>
333 <para>Halts, powers off, or reboots the machine</para>
334 <indexterm zone="ch-system-systemd poweroff">
335 <primary sortas="b-poweroff">poweroff</primary>
336 </indexterm>
337 </listitem>
338 </varlistentry>
339
340 <varlistentry id="reboot">
341 <term><command>reboot</command></term>
342 <listitem>
343 <para>Halts, powers off, or reboots the machine</para>
344 <indexterm zone="ch-system-systemd reboot">
345 <primary sortas="b-reboot">reboot</primary>
346 </indexterm>
347 </listitem>
348 </varlistentry>
349
350 <varlistentry id="runlevel">
351 <term><command>runlevel</command></term>
352 <listitem>
353 <para>Prints previous and current SysV runlevel</para>
354 <indexterm zone="ch-system-systemd runlevel">
355 <primary sortas="b-runlevel">runlevel</primary>
356 </indexterm>
357 </listitem>
358 </varlistentry>
359
360 <varlistentry id="shutdown">
361 <term><command>shutdown</command></term>
362 <listitem>
363 <para>Halts, powers off, or reboots the machine</para>
364 <indexterm zone="ch-system-systemd shutdown">
365 <primary sortas="b-shutdown">shutdown</primary>
366 </indexterm>
367 </listitem>
368 </varlistentry>
369
370 <varlistentry id="systemctl">
371 <term><command>systemctl</command></term>
372 <listitem>
373 <para>Control the systemd system and service manager</para>
374 <indexterm zone="ch-system-systemd systemctl">
375 <primary sortas="b-systemctl">systemctl</primary>
376 </indexterm>
377 </listitem>
378 </varlistentry>
379
380 <varlistentry id="systemd">
381 <term><command>systemd</command></term>
382 <listitem>
383 <para>System and service manager for Linux</para>
384 <indexterm zone="ch-system-systemd systemd">
385 <primary sortas="b-systemd">systemd</primary>
386 </indexterm>
387 </listitem>
388 </varlistentry>
389
390 <varlistentry id="systemd-analyze">
391 <term><command>systemd-analyze</command></term>
392 <listitem>
393 <para>Analyzes system boot-up permformance</para>
394 <indexterm zone="ch-system-systemd systemd-analyze">
395 <primary sortas="b-systemd-analyze">systemd-analyze</primary>
396 </indexterm>
397 </listitem>
398 </varlistentry>
399
400 <varlistentry id="systemd-ask-password">
401 <term><command>systemd-ask-password</command></term>
402 <listitem>
403 <para>Queries the user for a system passphrase, via the
404 TTY or an UI agent.</para>
405 <indexterm zone="ch-system-systemd systemd-ask-password">
406 <primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
407 </indexterm>
408 </listitem>
409 </varlistentry>
410
411 <varlistentry id="systemd-cat">
412 <term><command>systemd-cat</command></term>
413 <listitem>
414 <para>Connects a pipeline or program's output with the journal</para>
415 <indexterm zone="ch-system-systemd systemd-cat">
416 <primary sortas="b-systemd-cat">systemd-cat</primary>
417 </indexterm>
418 </listitem>
419 </varlistentry>
420
421 <varlistentry id="systemd-cgls">
422 <term><command>systemd-cgls</command></term>
423 <listitem>
424 <para>Recursively shows control group contents</para>
425 <indexterm zone="ch-system-systemd systemd-cgls">
426 <primary sortas="b-systemd-cgls">systemd-cgls</primary>
427 </indexterm>
428 </listitem>
429 </varlistentry>
430
431 <varlistentry id="systemd-cgtop">
432 <term><command>systemd-cgtop</command></term>
433 <listitem>
434 <para>Shows top control groups by resource usage</para>
435 <indexterm zone="ch-system-systemd systemd-cgtop">
436 <primary sortas="b-systemd-cgtop">systemd-cgtop</primary>
437 </indexterm>
438 </listitem>
439 </varlistentry>
440
441 <varlistentry id="systemd-coredumpctl">
442 <term><command>systemd-coredumpctl</command></term>
443 <listitem>
444 <para>Retrieves coredumps from the journal</para>
445 <indexterm zone="ch-system-systemd systemd-coredumpctl">
446 <primary sortas="b-systemd-coredumpctl">systemd-coredumpctl</primary>
447 </indexterm>
448 </listitem>
449 </varlistentry>
450
451 <varlistentry id="systemd-delta">
452 <term><command>systemd-delta</command></term>
453 <listitem>
454 <para>Finds overridden configuration files</para>
455 <indexterm zone="ch-system-systemd systemd-delta">
456 <primary sortas="b-systemd-delta">systemd-delta</primary>
457 </indexterm>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry id="systemd-detect-virt">
462 <term><command>systemd-detect-virt</command></term>
463 <listitem>
464 <para>Detects execution in a virtual environment</para>
465 <indexterm zone="ch-system-systemd systemd-detect-virt">
466 <primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary>
467 </indexterm>
468 </listitem>
469 </varlistentry>
470
471 <varlistentry id="systemd-inhibit">
472 <term><command>systemd-inhibit</command></term>
473 <listitem>
474 <para>Executes a program with an inhibition lock taken</para>
475 <indexterm zone="ch-system-systemd systemd-inhibit">
476 <primary sortas="b-systemd-inhibit">systemd-inhibit</primary>
477 </indexterm>
478 </listitem>
479 </varlistentry>
480
481 <varlistentry id="systemd-machine-id-setup">
482 <term><command>systemd-machine-id-setup</command></term>
483 <listitem>
484 <para>Initializes the machine ID in
485 <filename>/etc/machine-id</filename></para>
486 <indexterm zone="ch-system-systemd systemd-machine-id-setup">
487 <primary sortas="b-systemd-machine-id-setup">systemd-machine-id-setup</primary>
488 </indexterm>
489 </listitem>
490 </varlistentry>
491
492 <varlistentry id="systemd-notify">
493 <term><command>systemd-notify</command></term>
494 <listitem>
495 <para>Notifies init system about start-up completion and other daemon
496 status changes</para>
497 <indexterm zone="ch-system-systemd systemd-notify">
498 <primary sortas="b-systemd-notify">systemd-notify</primary>
499 </indexterm>
500 </listitem>
501 </varlistentry>
502
503 <varlistentry id="systemd-nspawn">
504 <term><command>systemd-nspawn</command></term>
505 <listitem>
506 <para>Spawns a namespace container for debugging, testing, and
507 building</para>
508 <indexterm zone="ch-system-systemd systemd-nspawn">
509 <primary sortas="b-systemd-nspawn">systemd-nspawn</primary>
510 </indexterm>
511 </listitem>
512 </varlistentry>
513
514 <varlistentry id="systemd-run">
515 <term><command>systemd-run</command></term>
516 <listitem>
517 <para>Runs programs in transient scope or service units</para>
518 <indexterm zone="ch-system-systemd systemd-run">
519 <primary sortas="b-systemd-run">systemd-run</primary>
520 </indexterm>
521 </listitem>
522 </varlistentry>
523
524 <varlistentry id="systemd-stdio-bridge">
525 <term><command>systemd-stdio-bridge</command></term>
526 <listitem>
527 <para>Connects stdio or a socket to a given bus address</para>
528 <indexterm zone="ch-system-systemd systemd-stdio-bridge">
529 <primary sortas="b-systemd-stdio-bridge">systemd-stdio-bridge</primary>
530 </indexterm>
531 </listitem>
532 </varlistentry>
533
534 <varlistentry id="systemd-tmpfiles">
535 <term><command>systemd-tmpfiles</command></term>
536 <listitem>
537 <para>Creates, deletes, and cleans up volatile and temporary files</para>
538 <indexterm zone="ch-system-systemd systemd-tmpfiles">
539 <primary sortas="b-systemd-tmpfiles">systemd-tmpfiles</primary>
540 </indexterm>
541 </listitem>
542 </varlistentry>
543
544 <varlistentry id="systemd-tty-ask-password-agent">
545 <term><command>systemd-tty-ask-password-agent</command></term>
546 <listitem>
547 <para>Process system password requests</para>
548 <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
549 <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
550 </indexterm>
551 </listitem>
552 </varlistentry>
553
554 <varlistentry id="telinit">
555 <term><command>telinit</command></term>
556 <listitem>
557 <para>Tells <command>init</command> which run-level to change to</para>
558 <indexterm zone="ch-system-systemd telinit">
559 <primary sortas="b-telinit">telinit</primary>
560 </indexterm>
561 </listitem>
562 </varlistentry>
563
564 <varlistentry id="timedatectl">
565 <term><command>timedatectl</command></term>
566 <listitem>
567 <para>Controls the system time and date</para>
568 <indexterm zone="ch-system-systemd timedatectl">
569 <primary sortas="b-timedatectl">timedatectl</primary>
570 </indexterm>
571 </listitem>
572 </varlistentry>
573
574 <varlistentry id="udevadm">
575 <term><command>udevadm</command></term>
576 <listitem>
577 <para>Udev management tool</para>
578 <indexterm zone="ch-system-systemd udevadm">
579 <primary sortas="b-udevadm">udevadm</primary>
580 </indexterm>
581 </listitem>
582 </varlistentry>
583
584 <varlistentry id="libnss_myhostname">
585 <term><filename class="libraryfile">libnss_myhostname</filename></term>
586 <listitem>
587 <para>Plugin for the GNU Name Service Switch (NSS) functionality
588 of Glibc, provding hostname resolution for the locally configured
589 system hostname</para>
590 <indexterm zone="ch-system-systemd libnss_myhostname">
591 <primary sortas="c-libnss_myhostname">libnss_myhostname</primary>
592 </indexterm>
593 </listitem>
594 </varlistentry>
595
596 <varlistentry id="libsystemd">
597 <term><filename class="libraryfile">libsystemd</filename></term>
598 <listitem>
599 <para>Support library for systemd</para>
600 <indexterm zone="ch-system-systemd libsystemd">
601 <primary sortas="c-libsystemd">libsystemd</primary>
602 </indexterm>
603 </listitem>
604 </varlistentry>
605
606 <varlistentry id="libudev">
607 <term><filename class="libraryfile">libudev</filename></term>
608 <listitem>
609 <para>A library interface to Udev device information.</para>
610 <indexterm zone="ch-system-systemd libudev">
611 <primary sortas="c-libudev">libudev</primary>
612 </indexterm>
613 </listitem>
614 </varlistentry>
615
616 </variablelist>
617
618 </sect2>
619
620</sect1>
Note: See TracBrowser for help on using the repository browser.