source: general/sysutils/systemd.xml@ 1552ac8

10.0 10.1 11.0 7.10 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind ken/refactor-virt lazarus nosym perl-modules qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 1552ac8 was 1552ac8, checked in by DJ Lucas <dj@…>, 5 years ago

[Systemd merge] - gpm, sysstat, udisks, udisks2, upower to finish Chapter 12

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@17457 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 10.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 <!ENTITY systemd-download-http "http://anduin.linuxfromscratch.org/sources/other/systemd/systemd-&systemd-version;.tar.xz">
8 <!ENTITY systemd-download-ftp " ">
9 <!ENTITY systemd-md5sum "7fd9c7b1296104ccc0b8aee4be3d3c23">
10 <!ENTITY systemd-size "3,748 KB">
11 <!ENTITY systemd-buildsize "1.0 GB">
12 <!ENTITY systemd-time "4.9 SBU">
13
14]>
15
16<sect1 id="systemd" xreflabel="Systemd-&systemd-version;" revision="systemd">
17 <?dbhtml filename="systemd.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>Systemd-&systemd-version;</title>
25
26 <indexterm zone="systemd">
27 <primary sortas="a-systemd">systemd</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to systemd</title>
32
33 <para>
34 While <application>systemd</application> was installed when
35 building LFS, there are many features provided by the package that
36 were not included in the initial installation becasue
37 <application>Linux-PAM</application> was not yet installed.
38 The <application>systemd</application> package needs to be
39 rebuilt to provide a working <command>systemd-logind</command> service,
40 which provides many additonal features for dependent packages.
41 </para>
42
43 &lfs79_checked;&gcc6_checked;
44
45 <bridgehead renderas="sect3">Package Information</bridgehead>
46 <itemizedlist spacing="compact">
47 <listitem>
48 <para>Download (HTTP): <ulink url="&systemd-download-http;"/></para>
49 </listitem>
50 <listitem>
51 <para>Download (FTP): <ulink url="&systemd-download-ftp;"/></para>
52 </listitem>
53 <listitem>
54 <para>Download MD5 sum: &systemd-md5sum;</para>
55 </listitem>
56 <listitem>
57 <para>Download size: &systemd-size;</para>
58 </listitem>
59 <listitem>
60 <para>Estimated disk space required: &systemd-buildsize;</para>
61 </listitem>
62 <listitem>
63 <para>Estimated build time: &systemd-time;</para>
64 </listitem>
65 </itemizedlist>
66
67 <bridgehead renderas="sect3">systemd Dependencies</bridgehead>
68
69 <bridgehead renderas="sect4">Required</bridgehead>
70 <para role="required">
71 <xref linkend="linux-pam"/>
72 </para>
73
74 <bridgehead renderas="sect4">Recommended Runtime Dependency</bridgehead>
75 <para role="recommended">
76 <xref linkend="polkit"/>
77 </para>
78
79 <bridgehead renderas="sect4">Optional</bridgehead>
80 <para role="optional">
81 <xref linkend="cacerts"/>,
82 <xref linkend="curl"/>,
83 <xref linkend="elfutils"/>,
84 <xref linkend="gnutls"/>,
85 <xref linkend="iptables"/>,
86 <xref linkend="libgcrypt"/>,
87 <xref linkend="libidn"/>,
88 <xref linkend="libxkbcommon"/>,
89 <xref linkend="python2"/> or
90 <xref linkend="python3"/>,
91 <xref linkend="qemu"/>,
92 <xref linkend="valgrind"/>,
93 <ulink url="https://www.kernel.org/pub/linux/utils/cryptsetup/">cryptsetup</ulink>,
94 <ulink url="http://sourceforge.net/projects/gnu-efi/">gnu-efi</ulink>,
95 <ulink url="https://www.kernel.org/pub/linux/utils/kernel/kexec/">kexec-tools</ulink>,
96 <ulink url="https://www.gnu.org/software/libmicrohttpd/">libmicrohttpd</ulink>,
97 <ulink url="http://sourceforge.net/projects/libseccomp/">libseccomp</ulink>,
98 <ulink url="http://lxml.de/">lxml</ulink> (Python Module),
99 <ulink url="https://code.google.com/p/lz4/">lz4</ulink>,
100 <ulink url="http://fukuchi.org/works/qrencode/">qrencode</ulink>,
101 <ulink url="http://sourceforge.net/projects/linuxquota/">quota-tools</ulink> and
102 <ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink>
103 </para>
104
105 <note>
106 <para>
107 In order to build the <application>systemd</application>
108 <application>Python</application> module, the
109 <application>lxml</application> package
110 needs to be installed for the corresponding
111 <application>Python</application> version (2 or 3).
112 Note that <command>configure</command> defaults to
113 <application>Python 2</application>. In order to build
114 the module for <application>Python 3</application>,
115 make sure you pass the <envar>PYTHON=python3</envar>
116 environment variable to the <command>configure</command>
117 command below.
118 </para>
119 </note>
120
121 <bridgehead renderas="sect4">Optional (to rebuild the manual pages)</bridgehead>
122 <para role="optional">
123 <xref linkend="DocBook"/>,
124 <xref linkend="docbook-xsl"/> and
125 <xref linkend="libxslt"/>
126 </para>
127
128 <para condition="html" role="usernotes">User Notes:
129 <ulink url="&blfs-wiki;/systemd"/>
130 </para>
131 </sect2>
132
133 <sect2 role="installation">
134 <title>Installation of systemd</title>
135
136 <para>First, fix a potential security issue with framebuffer
137 devices:</para>
138
139<screen><userinput>sed -e 's@DRI and frame buffer@DRI@' \
140 -e '/SUBSYSTEM==\"graphics\", KERNEL==\"fb\*\"/d' \
141 -i src/login/70-uaccess.rules</userinput></screen>
142
143 <para>
144 Disable two tests that always fail:
145 </para>
146
147<screen><userinput>sed -e 's:test/udev-test.pl ::g' \
148 -e 's:test-copy$(EXEEXT) ::g' \
149 -i Makefile.in</userinput></screen>
150
151 <para>
152 Rebuild <application>systemd</application> by running the
153 following commands:
154 </para>
155
156<screen><userinput>cc_cv_CFLAGS__flto=no \
157./configure --prefix=/usr \
158 --sysconfdir=/etc \
159 --localstatedir=/var \
160 --with-rootprefix= \
161 --with-rootlibdir=/lib \
162 --enable-split-usr \
163 --disable-firstboot \
164 --disable-ldconfig \
165 --disable-sysusers \
166 --without-python \
167 --with-default-dnssec=no \
168 --docdir=/usr/share/doc/systemd-&systemd-version; &amp;&amp;
169make</userinput></screen>
170
171 <note>
172 <para>
173 For the best results, make sure you run the testsuite from
174 a system that is booted by the same
175 <application>systemd</application> version you are rebuilding.
176 </para>
177 </note>
178
179 <para>
180 To test the results, issue: <command>make -k check</command>.
181 </para>
182
183 <warning>
184 <para>
185 Installing the package will overwrite all files installed by
186 <application>systemd</application> in LFS. It is critical that
187 nothing uses either <application>systemd</application> or
188 <application>Udev</application> libraries during the installation.
189 The best way to ensure that these libraries are not being used is to
190 run the installation in rescue mode. To switch to rescue mode,
191 run the following command as the
192 <systemitem class="username">root</systemitem> user (from a TTY):
193 </para>
194
195<screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
196 </warning>
197
198 <para>
199 Now, as the <systemitem class="username">root</systemitem> user:
200 </para>
201
202<screen role="root"><userinput>make install</userinput></screen>
203
204 <para>
205 Move NSS libraries to <filename class="directory">/lib</filename>
206 by running the following command as the <systemitem
207 class="username">root</systemitem> user:
208 </para>
209
210<screen role="root"><userinput>mv -v /usr/lib/libnss_{myhostname,mymachines,resolve}.so.2 /lib</userinput></screen>
211
212 <para>
213 Remove an unnecessary directory by running the following command
214 as the <systemitem class="username">root</systemitem> user:
215 </para>
216
217<screen role="root"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
218
219 </sect2>
220
221 <sect2 role="configuration">
222 <title>Configuring systemd</title>
223
224 <para>
225 The <filename>/etc/pam.d/system-sesion</filename> file needs to
226 be modified and a new file needs to be created in order for
227 <command>systemd-logind</command> to work correctly. Run the following
228 commands as the <systemitem class="username">root</systemitem> user:
229 </para>
230
231<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF"
232<literal># Begin Systemd addition
233
234session required pam_loginuid.so
235session optional pam_systemd.so
236
237# End Systemd addition</literal>
238EOF
239
240cat &gt; /etc/pam.d/systemd-user &lt;&lt; "EOF"
241<literal># Begin /etc/pam.d/systemd-user
242
243account required pam_access.so
244account include system-account
245
246session required pam_env.so
247session required pam_limits.so
248session include system-session
249
250auth required pam_deny.so
251password required pam_deny.so
252
253# End /etc/pam.d/systemd-user</literal>
254EOF</userinput></screen>
255
256 <para>
257 At this point, you should reload the systemd daemon, and reenter
258 multi-user mode with the following commands (as the
259 <systemitem class="username">root</systemitem> user):
260 </para>
261
262<screen role="root"><userinput>systemctl daemon-reload
263systemctl start multi-user.target</userinput></screen>
264
265 <warning><para>If upgrading from a previous version of systemd and an
266 initrd is used for system boot, you should generate a new initrd before
267 rebooting the system.</para></warning>
268
269 </sect2>
270
271 <sect2 role="content">
272 <title>Contents</title>
273
274 <para>
275 A list of the installed files, along with their short
276 descriptions can be found at
277 <ulink url="&lfs-root;/chapter06/systemd.html#contents-systemd"/>.
278 </para>
279
280 <para>
281 Listed below are the newly installed libraries and directories
282 along with short descriptions.
283 </para>
284
285 <segmentedlist>
286 <segtitle>Installed Programs</segtitle>
287 <segtitle>Installed Libraries</segtitle>
288 <segtitle>Installed Directories</segtitle>
289
290 <seglistitem>
291 <seg>
292 None
293 </seg>
294 <seg>
295 pam_systemd.so
296 (in <filename class="directory">/lib/security</filename>)
297 </seg>
298 <seg>
299 None
300 </seg>
301 </seglistitem>
302 </segmentedlist>
303
304 <variablelist>
305 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
306 <?dbfo list-presentation="list"?>
307 <?dbhtml list-presentation="table"?>
308
309 <varlistentry id="pam_systemd">
310 <term><filename class="libraryfile">pam_systemd.so</filename></term>
311 <listitem>
312 <para>
313 is a PAM module used to register user sessions with the
314 <application>systemd</application> login manager,
315 <command>systemd-logind</command>.
316 </para>
317 <indexterm zone="systemd pam_systemd">
318 <primary sortas="c-pam_systemd">pam_systemd.so</primary>
319 </indexterm>
320 </listitem>
321 </varlistentry>
322
323 </variablelist>
324
325 </sect2>
326
327</sect1>
Note: See TracBrowser for help on using the repository browser.