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

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

Update to installed dirs for systemd

  • Property mode set to 100644
File size: 17.9 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 211 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">The <filename>timesyncd.conf</filename> file contains a
36 reference to a non-existent <filename>timesyncd.conf(5)</filename> man
37 page. Remove that reference to avoid possible confusion:</para>
38
39<screen os="s2"><userinput>sed -i '/timesyncd.conf/d' src/timesync/timesyncd.conf.in</userinput></screen>
40
41 <para os="a">Prepare systemd for compilation:</para>
42
43<screen os="b"><userinput>./configure --prefix=/usr \
44 --sysconfdir=/etc --localstatedir=/var \
45 --libexecdir=/usr/lib --docdir=/usr/share/doc/systemd-&systemd-version; \
46 --with-rootprefix="" --with-rootlibdir=/lib \
47 --enable-split-usr --disable-gudev --with-kbd-loadkeys=/bin/loadkeys \
48 --with-kbd-setfont=/bin/setfont --with-dbuspolicydir=/etc/dbus-1/system.d \
49 --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \
50 --with-dbussessionservicedir=/usr/share/dbus-1/services \
51 --with-dbussystemservicedir=/usr/share/dbus-1/system-services</userinput></screen>
52
53 <variablelist os="c">
54 <title>The meaning of the configure options:</title>
55
56 <varlistentry>
57 <term><parameter>--with-root*</parameter></term>
58 <listitem>
59 <para>These switches ensure that core programs and
60 shared libraries are installed in the subdirectories
61 of the root partition.</para>
62 </listitem>
63 </varlistentry>
64
65 <varlistentry>
66 <term><parameter>--enable-split-usr</parameter></term>
67 <listitem>
68 <para>This switch ensures that systemd will work on
69 systems where /bin, /lib and /sbin directories are not
70 symlinks to their /usr counterparts.</para>
71 </listitem>
72 </varlistentry>
73
74 <varlistentry>
75 <term><parameter>--disable-gudev</parameter></term>
76 <listitem>
77 <para>This switch prevents systemd from building
78 <filename class="libraryfile">libgudev</filename> as it requires
79 Glib, which is not installed in CLFS.</para>
80 </listitem>
81 </varlistentry>
82
83 <varlistentry>
84 <term><parameter>--with-dbus*</parameter></term>
85 <listitem>
86 <para>These switches ensure that D-Bus configuration files get
87 installed to the correct locations.</para>
88 </listitem>
89 </varlistentry>
90 </variablelist>
91
92 <para os="d">Compile the package:</para>
93
94<screen os="e"><userinput>make</userinput></screen>
95
96 <para os="f">Prevent a broken test case from running:</para>
97
98<screen os="g"><userinput remap="test">sed -e "s:test/udev-test.pl::g" \
99 -e "s:test-bus-cleanup\$(EXEEXT) ::g" \
100 -e "s:test-bus-gvariant\$(EXEEXT) ::g" \
101 -i Makefile</userinput></screen>
102
103 <para os="h">To test the results, issue:</para>
104
105<screen os="i"><userinput remap="test">make check</userinput></screen>
106
107 <para os="j">Install the package:</para>
108
109<screen os="k"><userinput>make install</userinput></screen>
110
111 <para os="l">Install documentation files that are not installed by default:</para>
112
113<screen os="m"><userinput>install -v -m644 man/*.html /usr/share/doc/systemd-&systemd-version;</userinput></screen>
114
115 <para os="n">Move NSS myhostname library to <filename class="directory">/lib
116</filename>:</para>
117
118<screen os="o"><userinput>mv -v /usr/lib/libnss_myhostname.so.2 /lib</userinput></screen>
119
120 <para os="p">Remove an unnecessary directory:</para>
121
122<screen os="q"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
123
124 <para os="r">Create symlinks for backwards-compatibility with Sysvinit:</para>
125
126<screen os="s"><userinput>for tool in runlevel reboot shutdown poweroff halt telinit; do
127 ln -sfv ../bin/systemctl /sbin/$tool
128done
129ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
130
131 <para os="t">Modify a configuration file which references a group that
132 doesn't exist:</para>
133
134<screen os="u"><userinput>sed -i "s@root lock@root root@g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
135
136 </sect2>
137
138 <sect2 id="conf-systemd" role="configuration">
139 <title>Configuring Systemd</title>
140
141 <indexterm zone="conf-systemd">
142 <primary sortas="a-systemd">systemd</primary>
143 <secondary>configuring</secondary></indexterm>
144
145 <indexterm zone="conf-systemd">
146 <primary sortas="e-/etc/os-release">/etc/os-release</primary>
147 </indexterm>
148
149 <para>Create <filename>/etc/machine-id</filename> which is needed
150 by Journald:</para>
151
152<screen><userinput>systemd-machine-id-setup</userinput></screen>
153
154 <para>Create a file to identify the operating system.
155 <command>systemd</command> will use this file on boot to put information
156 on the screen.</para>
157
158<screen><userinput>cat &gt; /etc/os-release &lt;&lt; "EOF"
159# Begin /etc/os-release
160
161NAME=Cross-LFS
162ID=clfs
163
164PRETTY_NAME=Cross Linux From Scratch
165ANSI_COLOR=0;33
166
167VERSION=&version;
168VERSION_ID=&versionid;
169
170# End /etc/os-release
171EOF</userinput></screen>
172
173 </sect2>
174
175 <sect2 id="contents-systemd" role="content">
176 <title>Contents of Systemd</title>
177
178 <segmentedlist>
179 <segtitle>Installed programs</segtitle>
180 <segtitle>Installed libraries</segtitle>
181 <segtitle>Installed directories</segtitle>
182
183 <seglistitem>
184 <seg>bootctl, busctl, halt (link to systemctl), hostnamectl,
185 init (link to systemd), journalctl, kernel-install, localectl, loginctl,
186 machinectl, poweroff (link to systemctl), reboot (link to systemctl),
187 runlevel (link to systemctl), shutdown (link to systemctl),
188 systemctl, system-analyze, systemd-ask-password, systemd-cat,
189 systemd-cgls, systemd-cgtop, systemd-coredumpctl, systemd-delta,
190 systemd-detect-virt, systemd-inhibit, systemd-machine-id-setup,
191 systemd-notify, systemd-nspawn, systemd-run, systemd-stdio-bridge
192 (link to systemd-bus-proxyd), systemd-tmpfiles,
193 systemd-tty-ask-password-agent, telinit (link to systemctl),
194 timedatectl, udevadm</seg>
195 <seg>libnss_myhostname.so, libsystemd.so, libudev.so</seg>
196 <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
197 /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
198 /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
199 /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d,
200 /usr/lib/sysctl.d, /usr/lib/systemd,
201 /usr/share/doc-systemd-&systemd-version;, /usr/share/systemd,
202 /usr/share/zsh, /var/lib/systemd</seg>
203 </seglistitem>
204 </segmentedlist>
205
206 <variablelist>
207 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
208 <?dbfo list-presentation="list"?>
209 <?dbhtml list-presentation="table"?>
210
211 <varlistentry id="bootctl">
212 <term><command>bootctl</command></term>
213 <listitem>
214 <para>Controls the firmware and boot manager settings</para>
215 <indexterm zone="ch-system-systemd bootctl">
216 <primary sortas="b-bootctl">bootctl</primary>
217 </indexterm>
218 </listitem>
219 </varlistentry>
220
221 <varlistentry id="busctl">
222 <term><command>busctl</command></term>
223 <listitem>
224 <para>Introspects and monitors the D-Bus bus</para>
225 <indexterm zone="ch-system-systemd busctl">
226 <primary sortas="b-busctl">busctl</primary>
227 </indexterm>
228 </listitem>
229 </varlistentry>
230
231 <varlistentry id="halt">
232 <term><command>halt</command></term>
233 <listitem>
234 <para>Halts, powers off, or reboots the machine</para>
235 <indexterm zone="ch-system-systemd halt">
236 <primary sortas="b-halt">halt</primary>
237 </indexterm>
238 </listitem>
239 </varlistentry>
240
241 <varlistentry id="hostnamectl">
242 <term><command>hostnamectl</command></term>
243 <listitem>
244 <para>Controls the system hostname</para>
245 <indexterm zone="ch-system-systemd hostnamectl">
246 <primary sortas="b-hostnamectl">hostnamectl</primary>
247 </indexterm>
248 </listitem>
249 </varlistentry>
250
251 <varlistentry id="init">
252 <term><command>init</command></term>
253 <listitem>
254 <para>systemd system and service manager</para>
255 <indexterm zone="ch-system-systemd init">
256 <primary sortas="b-init">init</primary>
257 </indexterm>
258 </listitem>
259 </varlistentry>
260
261 <varlistentry id="journalctl">
262 <term><command>journalctl</command></term>
263 <listitem>
264 <para>Queries the systemd journal</para>
265 <indexterm zone="ch-system-systemd journalctl">
266 <primary sortas="b-journalctl">journalctl</primary>
267 </indexterm>
268 </listitem>
269 </varlistentry>
270
271 <varlistentry id="kernel-install">
272 <term><command>kernel-install</command></term>
273 <listitem>
274 <para>Adds and removes kernel and initramfs images to and from
275 <filename class="directory">/boot</filename></para>
276 <indexterm zone="ch-system-systemd kernel-install">
277 <primary sortas="b-kernel-install">kernel-install</primary>
278 </indexterm>
279 </listitem>
280 </varlistentry>
281
282 <varlistentry id="localectl">
283 <term><command>localectl</command></term>
284 <listitem>
285 <para>Controls the system locale and keyboard layout settings</para>
286 <indexterm zone="ch-system-systemd localectl">
287 <primary sortas="b-localectl">localectl</primary>
288 </indexterm>
289 </listitem>
290 </varlistentry>
291
292 <varlistentry id="loginctl">
293 <term><command>loginctl</command></term>
294 <listitem>
295 <para>Controls the systemd login manager</para>
296 <indexterm zone="ch-system-systemd loginctl">
297 <primary sortas="b-loginctl">loginctl</primary>
298 </indexterm>
299 </listitem>
300 </varlistentry>
301
302 <varlistentry id="machinectl">
303 <term><command>machinectl</command></term>
304 <listitem>
305 <para>Controls the systemd machine manager</para>
306 <indexterm zone="ch-system-systemd machinectl">
307 <primary sortas="b-machinectl">machinectl</primary>
308 </indexterm>
309 </listitem>
310 </varlistentry>
311
312 <varlistentry id="poweroff">
313 <term><command>poweroff</command></term>
314 <listitem>
315 <para>Halts, powers off, or reboots the machine</para>
316 <indexterm zone="ch-system-systemd poweroff">
317 <primary sortas="b-poweroff">poweroff</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 <varlistentry id="reboot">
323 <term><command>reboot</command></term>
324 <listitem>
325 <para>Halts, powers off, or reboots the machine</para>
326 <indexterm zone="ch-system-systemd reboot">
327 <primary sortas="b-reboot">reboot</primary>
328 </indexterm>
329 </listitem>
330 </varlistentry>
331
332 <varlistentry id="runlevel">
333 <term><command>runlevel</command></term>
334 <listitem>
335 <para>Prints previous and current SysV runlevel</para>
336 <indexterm zone="ch-system-systemd runlevel">
337 <primary sortas="b-runlevel">runlevel</primary>
338 </indexterm>
339 </listitem>
340 </varlistentry>
341
342 <varlistentry id="shutdown">
343 <term><command>shutdown</command></term>
344 <listitem>
345 <para>Halts, powers off, or reboots the machine</para>
346 <indexterm zone="ch-system-systemd shutdown">
347 <primary sortas="b-shutdown">shutdown</primary>
348 </indexterm>
349 </listitem>
350 </varlistentry>
351
352 <varlistentry id="systemctl">
353 <term><command>systemctl</command></term>
354 <listitem>
355 <para>Control the systemd system and service manager</para>
356 <indexterm zone="ch-system-systemd systemctl">
357 <primary sortas="b-systemctl">systemctl</primary>
358 </indexterm>
359 </listitem>
360 </varlistentry>
361
362 <varlistentry id="systemd">
363 <term><command>systemd</command></term>
364 <listitem>
365 <para>System and service manager for Linux</para>
366 <indexterm zone="ch-system-systemd systemd">
367 <primary sortas="b-systemd">systemd</primary>
368 </indexterm>
369 </listitem>
370 </varlistentry>
371
372 <varlistentry id="systemd-analyze">
373 <term><command>systemd-analyze</command></term>
374 <listitem>
375 <para>Analyzes system boot-up permformance</para>
376 <indexterm zone="ch-system-systemd systemd-analyze">
377 <primary sortas="b-systemd-analyze">systemd-analyze</primary>
378 </indexterm>
379 </listitem>
380 </varlistentry>
381
382 <varlistentry id="systemd-ask-password">
383 <term><command>systemd-ask-password</command></term>
384 <listitem>
385 <para>Queries the user for a system passphrase, via the
386 TTY or an UI agent.</para>
387 <indexterm zone="ch-system-systemd systemd-ask-password">
388 <primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
389 </indexterm>
390 </listitem>
391 </varlistentry>
392
393 <varlistentry id="systemd-cat">
394 <term><command>systemd-cat</command></term>
395 <listitem>
396 <para>Connects a pipeline or program's output with the journal</para>
397 <indexterm zone="ch-system-systemd systemd-cat">
398 <primary sortas="b-systemd-cat">systemd-cat</primary>
399 </indexterm>
400 </listitem>
401 </varlistentry>
402
403 <varlistentry id="systemd-cgls">
404 <term><command>systemd-cgls</command></term>
405 <listitem>
406 <para>Recursively shows control group contents</para>
407 <indexterm zone="ch-system-systemd systemd-cgls">
408 <primary sortas="b-systemd-cgls">systemd-cgls</primary>
409 </indexterm>
410 </listitem>
411 </varlistentry>
412
413 <varlistentry id="systemd-notify">
414 <term><command>systemd-notify</command></term>
415 <listitem>
416 <para>Notify init system about start-up completion and other daemon
417 status changes</para>
418 <indexterm zone="ch-system-systemd systemd-notify">
419 <primary sortas="b-systemd-notify">systemd-notify</primary>
420 </indexterm>
421 </listitem>
422 </varlistentry>
423
424 <varlistentry id="systemd-tty-ask-password-agent">
425 <term><command>systemd-tty-ask-password-agent</command></term>
426 <listitem>
427 <para>Process system password requests</para>
428 <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
429 <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
430 </indexterm>
431 </listitem>
432 </varlistentry>
433
434 <varlistentry id="telinit">
435 <term><command>telinit</command></term>
436 <listitem>
437 <para>Tells <command>init</command> which run-level to change to</para>
438 <indexterm zone="ch-system-systemd telinit">
439 <primary sortas="b-telinit">telinit</primary>
440 </indexterm>
441 </listitem>
442 </varlistentry>
443
444 <varlistentry id="pam_systemd">
445 <term><filename class="libraryfile">pam_systemd</filename></term>
446 <listitem>
447 <para>Register user sessions in the systemd control group
448 hierarchy</para>
449 <indexterm zone="ch-system-systemd pam_systemd">
450 <primary sortas="c-pam_systemd">pam_systemd</primary>
451 </indexterm>
452 </listitem>
453 </varlistentry>
454
455 <varlistentry id="lib-systemd">
456 <term><filename class="directory">/lib/systemd</filename></term>
457 <listitem>
458 <para>Location of system units and configurations</para>
459 <indexterm zone="ch-system-systemd lib-systemd">
460 <primary sortas="e-/lib/systemd">/lib/systemd</primary>
461 </indexterm>
462 </listitem>
463 </varlistentry>
464
465 <varlistentry id="etc-systemd">
466 <term><filename class="directory">/etc/systemd</filename></term>
467 <listitem>
468 <para>Location of user units and configurations</para>
469 <indexterm zone="ch-system-systemd etc-systemd">
470 <primary sortas="e-/etc/systemd">/etc/systemd</primary>
471 </indexterm>
472 </listitem>
473 </varlistentry>
474
475 <varlistentry id="etc-tmpfilesd">
476 <term><filename class="directory">/etc/tmpfiles.d</filename></term>
477 <listitem>
478 <para>Configuration for creation, deletion and cleaning of temporary
479 and volatile files</para>
480 <indexterm zone="ch-system-systemd etc-tmpfilesd">
481 <primary sortas="e-/etc/tmpfiles.d">/etc/tmpfiles.d</primary>
482 </indexterm>
483 </listitem>
484 </varlistentry>
485
486 <varlistentry id="usr-share-systemd">
487 <term><filename class="directory">/usr/share/systemd</filename></term>
488 <listitem>
489 <para>Location of session unit files</para>
490 <indexterm zone="ch-system-systemd usr-share-systemd">
491 <primary sortas="e-/usr/share/systemd">/usr/share/systemd</primary>
492 </indexterm>
493 </listitem>
494 </varlistentry>
495
496 </variablelist>
497
498 </sect2>
499
500</sect1>
Note: See TracBrowser for help on using the repository browser.