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

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

Update to systemd command explanations

  • Property mode set to 100644
File size: 11.4 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">Apply a patch so that compat <command>pkg-config</command>
28 files get installed without installing compat libraries:</para>
29
30<screen os="p2"><userinput>patch -Np1 -i ../&systemd-compat-patch;</userinput></screen>
31
32 <para os="a">Prepare Systemd for compilation:</para>
33
34<screen os="b"><userinput>./configure --prefix=/usr \
35 --sysconfdir=/etc --localstatedir=/var \
36 --libexecdir=/usr/lib --docdir=/usr/share/doc/systemd-&systemd-version; \
37 --with-rootprefix="" --with-rootlibdir=/lib \
38 --enable-split-usr --disable-gudev --with-kbd-loadkeys=/bin/loadkeys \
39 --with-kbd-setfont=/bin/setfont --with-dbuspolicydir=/etc/dbus-1/system.d \
40 --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \
41 --with-dbussessionservicedir=/usr/share/dbus-1/services \
42 --with-dbussystemservicedir=/usr/share/dbus-1/system-services</userinput></screen>
43
44 <variablelist os="c">
45 <title>The meaning of the configure options:</title>
46
47 <varlistentry>
48 <term><parameter>--with-root*</parameter></term>
49 <listitem>
50 <para>These switches ensure that core programs and
51 shared libraries are installed in the subdirectories
52 of the root partition.</para>
53 </listitem>
54 </varlistentry>
55
56 <varlistentry>
57 <term><parameter>--enable-split-usr</parameter></term>
58 <listitem>
59 <para>This switch ensures that Systemd will work on
60 systems where /bin, /lib and /sbin directories are not
61 symlinks to their /usr counterparts.</para>
62 </listitem>
63 </varlistentry>
64
65 <varlistentry>
66 <term><parameter>--disable-gudev</parameter></term>
67 <listitem>
68 <para>This switch prevents Systemd from building
69 <filename class="libraryfile">libgudev</filename> as it requires
70 Glib, which is not installed in CLFS.</para>
71 </listitem>
72 </varlistentry>
73
74 <varlistentry>
75 <term><parameter>--with-dbus*</parameter></term>
76 <listitem>
77 <para>These switches ensure that D-Bus configuration files get
78 installed to the correct locations.</para>
79 </listitem>
80 </varlistentry>
81 </variablelist>
82
83 <para os="d">Compile the package:</para>
84
85<screen os="e"><userinput>make</userinput></screen>
86
87 <para os="f">Prevent a broken test case from running:</para>
88
89<screen os="g"><userinput remap="test">sed -e "s:test/udev-test.pl::g" \
90 -e "s:test-bus-cleanup\$(EXEEXT) ::g" \
91 -e "s:test-bus-gvariant\$(EXEEXT) ::g" \
92 -i Makefile</userinput></screen>
93
94 <para os="h">Test the results, issue:</para>
95
96<screen os="i"><userinput remap="test">make check</userinput></screen>
97
98 <para os="j">Install the package:</para>
99
100<screen os="k"><userinput>make install</userinput></screen>
101
102 <para os="l">Install documentation files that are not installed by default:</para>
103
104<screen os="m"><userinput>install -v -m644 man/*.html /usr/share/doc/systemd-&systemd-version;</userinput></screen>
105
106 <para os="n">Move NSS myhostname library to <filename class="directory">/lib
107</filename>:</para>
108
109<screen os="o"><userinput>mv -v /usr/lib/libnss_myhostname.so.2 /lib</userinput></screen>
110
111 <para os="p">Remove an unnecessary directory:</para>
112
113<screen os="q"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
114
115 <para os="r">Create symlinks for backwards-compatibility with Sysvinit:</para>
116
117<screen os="s"><userinput>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 os="t">Modify a configuration file which references a group that
123 doesn't exist:</para>
124
125<screen os="u"><userinput>sed -i "s@root lock@root root@g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
126
127 </sect2>
128
129 <sect2 id="conf-systemd" role="configuration">
130 <title>Configuring Systemd</title>
131
132 <indexterm zone="conf-systemd">
133 <primary sortas="a-systemd">systemd</primary>
134 <secondary>configuring</secondary></indexterm>
135
136 <indexterm zone="conf-systemd">
137 <primary sortas="e-/etc/os-release">/etc/os-release</primary>
138 </indexterm>
139
140 <para>Create <filename>/etc/machine-id</filename> which is needed
141 by Journald:</para>
142
143<screen><userinput>systemd-machine-id-setup</userinput></screen>
144
145 <para>Create a file to identify the operating system.
146 <command>systemd</command> will use this file on boot to put information
147 on the screen.</para>
148
149<screen><userinput>cat &gt; /etc/os-release &lt;&lt; "EOF"
150# Begin /etc/os-release
151
152NAME=Cross-LFS
153ID=clfs
154
155PRETTY_NAME=Cross Linux From Scratch
156ANSI_COLOR=0;33
157
158VERSION=&version;
159VERSION_ID=&versionid;
160
161# End /etc/os-release
162EOF</userinput></screen>
163
164 </sect2>
165
166 <sect2 id="contents-systemd" role="content">
167 <title>Contents of Systemd</title>
168
169 <segmentedlist>
170 <segtitle>Installed programs</segtitle>
171 <segtitle>Installed libraries</segtitle>
172 <segtitle>Installed directories</segtitle>
173
174 <seglistitem>
175 <seg>bootctl, busctl, halt (link to systemctl), hostnamectl,
176 init (link to systemd), journalctl, kernel-install, localectl, loginctl,
177 machinectl, poweroff (link to systemctl), reboot (link to systemctl),
178 runlevel (link to systemctl), shutdown (link to systemctl),
179 systemctl, system-analyze, systemd-ask-password, systemd-cat,
180 systemd-cgls, systemd-cgtop, systemd-coredumpctl, systemd-delta,
181 systemd-detect-virt, systemd-inhibit, systemd-machine-id-setup,
182 systemd-notify, systemd-nspawn, systemd-run, systemd-stdio-bridge
183 (link to systemd-bus-proxyd), systemd-tmpfiles,
184 systemd-tty-ask-password-agent, telinit (link to systemctl),
185 timedatectl, udevadm</seg>
186 <seg>libnss_myhostname.so, libsystemd.so, libudev.so</seg>
187 <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
188 /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
189 /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
190 /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d,
191 /usr/lib/sysctl.d, /usr/lib/systemd,
192 /usr/share/doc-systemd-&systemd-version;, /usr/share/systemd,
193 /var/lib/systemd</seg>
194 </seglistitem>
195 </segmentedlist>
196
197 <variablelist>
198 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
199 <?dbfo list-presentation="list"?>
200 <?dbhtml list-presentation="table"?>
201
202 <varlistentry id="systemctl">
203 <term><command>systemctl</command></term>
204 <listitem>
205 <para>Control the Systemd system and service manager</para>
206 <indexterm zone="ch-system-systemd systemctl">
207 <primary sortas="b-systemctl">systemctl</primary>
208 </indexterm>
209 </listitem>
210 </varlistentry>
211
212 <varlistentry id="systemd">
213 <term><command>systemd</command></term>
214 <listitem>
215 <para>System and service manager for Linux</para>
216 <indexterm zone="ch-system-systemd systemd">
217 <primary sortas="b-systemd">systemd</primary>
218 </indexterm>
219 </listitem>
220 </varlistentry>
221
222 <varlistentry id="systemd-ask-password">
223 <term><command>systemd-ask-password</command></term>
224 <listitem>
225 <para>Queries the user for a system passphrase, via the
226 TTY or an UI agent.</para>
227 <indexterm zone="ch-system-systemd systemd-ask-password">
228 <primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
229 </indexterm>
230 </listitem>
231 </varlistentry>
232
233 <varlistentry id="systemd-cgls">
234 <term><command>systemd-cgls</command></term>
235 <listitem>
236 <para>Recursively shows control group contents</para>
237 <indexterm zone="ch-system-systemd systemd-cgls">
238 <primary sortas="b-systemd-cgls">systemd-cgls</primary>
239 </indexterm>
240 </listitem>
241 </varlistentry>
242
243 <varlistentry id="systemd-notify">
244 <term><command>systemd-notify</command></term>
245 <listitem>
246 <para>Notify init system about start-up completion and other daemon
247 status changes</para>
248 <indexterm zone="ch-system-systemd systemd-notify">
249 <primary sortas="b-systemd-notify">systemd-notify</primary>
250 </indexterm>
251 </listitem>
252 </varlistentry>
253
254 <varlistentry id="systemd-tty-ask-password-agent">
255 <term><command>systemd-tty-ask-password-agent</command></term>
256 <listitem>
257 <para>Process system password requests</para>
258 <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
259 <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
260 </indexterm>
261 </listitem>
262 </varlistentry>
263
264 <varlistentry id="pam_systemd">
265 <term><filename class="libraryfile">pam_systemd</filename></term>
266 <listitem>
267 <para>Register user sessions in the Systemd control group
268 hierarchy</para>
269 <indexterm zone="ch-system-systemd pam_systemd">
270 <primary sortas="c-pam_systemd">pam_systemd</primary>
271 </indexterm>
272 </listitem>
273 </varlistentry>
274
275 <varlistentry id="lib-systemd">
276 <term><filename class="directory">/lib/systemd</filename></term>
277 <listitem>
278 <para>Location of system units and configurations</para>
279 <indexterm zone="ch-system-systemd lib-systemd">
280 <primary sortas="e-/lib/systemd">/lib/systemd</primary>
281 </indexterm>
282 </listitem>
283 </varlistentry>
284
285 <varlistentry id="etc-systemd">
286 <term><filename class="directory">/etc/systemd</filename></term>
287 <listitem>
288 <para>Location of user units and configurations</para>
289 <indexterm zone="ch-system-systemd etc-systemd">
290 <primary sortas="e-/etc/systemd">/etc/systemd</primary>
291 </indexterm>
292 </listitem>
293 </varlistentry>
294
295 <varlistentry id="etc-tmpfilesd">
296 <term><filename class="directory">/etc/tmpfiles.d</filename></term>
297 <listitem>
298 <para>Configuration for creation, deletion and cleaning of temporary
299 and volatile files</para>
300 <indexterm zone="ch-system-systemd etc-tmpfilesd">
301 <primary sortas="e-/etc/tmpfiles.d">/etc/tmpfiles.d</primary>
302 </indexterm>
303 </listitem>
304 </varlistentry>
305
306 <varlistentry id="usr-share-systemd">
307 <term><filename class="directory">/usr/share/systemd</filename></term>
308 <listitem>
309 <para>Location of session unit files</para>
310 <indexterm zone="ch-system-systemd usr-share-systemd">
311 <primary sortas="e-/usr/share/systemd">/usr/share/systemd</primary>
312 </indexterm>
313 </listitem>
314 </varlistentry>
315
316 </variablelist>
317
318 </sect2>
319
320</sect1>
Note: See TracBrowser for help on using the repository browser.