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