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