source: general/sysutils/systemd.xml@ 1ac8b4c6

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 1ac8b4c6 was 1ac8b4c6, checked in by Douglas R. Reno <renodr@…>, 8 years ago

Update to wayland-protocols-1.7
Update to sawfish-1.12.0
Update to libevdev-1.5.4
Update to dbus-1.10.10
Fix a URL in the systemd page
Tags

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

  • Property mode set to 100644
File size: 10.8 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 "2647855c8f9cdf824953f1091db2d2b2">
10 <!ENTITY systemd-size "3,840 KB">
11 <!ENTITY systemd-buildsize "447 MB">
12 <!ENTITY systemd-time "6.4 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 &lfs7a_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 <xref linkend="zsh"/> (for the zsh completions),
94 <ulink url="https://www.kernel.org/pub/linux/utils/cryptsetup/">cryptsetup</ulink>,
95 <ulink url="http://sourceforge.net/projects/gnu-efi/">gnu-efi</ulink>,
96 <ulink url="https://www.kernel.org/pub/linux/utils/kernel/kexec/">kexec-tools</ulink>,
97 <ulink url="https://www.gnu.org/software/libmicrohttpd/">libmicrohttpd</ulink>,
98 <ulink url="http://sourceforge.net/projects/libseccomp/">libseccomp</ulink>,
99 <ulink url="http://lxml.de/">lxml</ulink> (Python Module),
100 <ulink url="https://github.com/Cyan4973/lz4">lz4</ulink>,
101 <ulink url="http://fukuchi.org/works/qrencode/">qrencode</ulink>,
102 <ulink url="http://sourceforge.net/projects/linuxquota/">quota-tools</ulink> and
103 <ulink url="https://pypi.python.org/pypi/Sphinx">Sphinx</ulink>
104 </para>
105
106 <note>
107 <para>
108 In order to build the <application>systemd</application>
109 <application>Python</application> module, the
110 <application>lxml</application> package
111 needs to be installed for the corresponding
112 <application>Python</application> version (2 or 3).
113 Note that <command>configure</command> defaults to
114 <application>Python 2</application>. In order to build
115 the module for <application>Python 3</application>,
116 make sure you pass the <envar>PYTHON=python3</envar>
117 environment variable to the <command>configure</command>
118 command below.
119 </para>
120 </note>
121
122 <bridgehead renderas="sect4">Optional (to rebuild the manual pages)</bridgehead>
123 <para role="optional">
124 <xref linkend="DocBook"/>,
125 <xref linkend="docbook-xsl"/> and
126 <xref linkend="libxslt"/>
127 </para>
128
129 <para condition="html" role="usernotes">User Notes:
130 <ulink url="&blfs-wiki;/systemd"/>
131 </para>
132 </sect2>
133
134 <sect2 role="installation">
135 <title>Installation of systemd</title>
136
137<!-- Not needed as of v231 -renodr
138 <para>First, fix a potential security issue with framebuffer
139 devices:</para>
140
141<screen><userinput>sed -e 's@DRI and frame buffer@DRI@' \
142 -e '/SUBSYSTEM==\"graphics\", KERNEL==\"fb\*\"/d' \
143 -i src/login/70-uaccess.rules</userinput></screen>
144-->
145
146 <para>
147 Disable two tests that always fail:
148 </para>
149
150<screen><userinput>sed -e 's:test/udev-test.pl ::g' \
151 -e 's:test-copy$(EXEEXT) ::g' \
152 -i Makefile.in</userinput></screen>
153
154 <para>
155 Rebuild <application>systemd</application> by running the
156 following commands:
157 </para>
158
159<screen><userinput>cc_cv_CFLAGS__flto=no \
160./configure --prefix=/usr \
161 --sysconfdir=/etc \
162 --localstatedir=/var \
163 --with-rootprefix= \
164 --with-rootlibdir=/lib \
165 --enable-split-usr \
166 --disable-firstboot \
167 --disable-ldconfig \
168 --disable-sysusers \
169 --without-python \
170 --with-default-dnssec=no \
171 --docdir=/usr/share/doc/systemd-&systemd-version; &amp;&amp;
172make</userinput></screen>
173
174 <note>
175 <para>
176 For the best results, make sure you run the testsuite from
177 a system that is booted by the same
178 <application>systemd</application> version you are rebuilding.
179 </para>
180 </note>
181
182 <para>
183 To test the results, issue: <command>make -k check</command>.
184 </para>
185
186 <warning>
187 <para>
188 Installing the package will overwrite all files installed by
189 <application>systemd</application> in LFS. It is critical that
190 nothing uses either <application>systemd</application> or
191 <application>Udev</application> libraries during the installation.
192 The best way to ensure that these libraries are not being used is to
193 run the installation in rescue mode. To switch to rescue mode,
194 run the following command as the
195 <systemitem class="username">root</systemitem> user (from a TTY):
196 </para>
197
198<screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
199 </warning>
200
201 <para>
202 Now, as the <systemitem class="username">root</systemitem> user:
203 </para>
204
205<screen role="root"><userinput>make install</userinput></screen>
206
207 <para>
208 Move the NSS libraries to <filename class="directory">/lib</filename>
209 by running the following command as the <systemitem
210 class="username">root</systemitem> user:
211 </para>
212
213<screen role="root"><userinput>mv -v /usr/lib/libnss_{myhostname,mymachines,resolve}.so.2 /lib</userinput></screen>
214
215 <para>
216 Remove an unnecessary directory by running the following command
217 as the <systemitem class="username">root</systemitem> user:
218 </para>
219
220<screen role="root"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
221
222 </sect2>
223
224 <sect2 role="configuration">
225 <title>Configuring systemd</title>
226
227 <para>
228 The <filename>/etc/pam.d/system-sesion</filename> file needs to
229 be modified and a new file needs to be created in order for
230 <command>systemd-logind</command> to work correctly. Run the following
231 commands as the <systemitem class="username">root</systemitem> user:
232 </para>
233
234<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF"
235<literal># Begin Systemd addition
236
237session required pam_loginuid.so
238session optional pam_systemd.so
239
240# End Systemd addition</literal>
241EOF
242
243cat &gt; /etc/pam.d/systemd-user &lt;&lt; "EOF"
244<literal># Begin /etc/pam.d/systemd-user
245
246account required pam_access.so
247account include system-account
248
249session required pam_env.so
250session required pam_limits.so
251session include system-session
252
253auth required pam_deny.so
254password required pam_deny.so
255
256# End /etc/pam.d/systemd-user</literal>
257EOF</userinput></screen>
258
259 <para>
260 At this point, you should reload the systemd daemon, and reenter
261 multi-user mode with the following commands (as the
262 <systemitem class="username">root</systemitem> user):
263 </para>
264
265<screen role="root"><userinput>systemctl daemon-reload
266systemctl start multi-user.target</userinput></screen>
267
268 <warning><para>If upgrading from a previous version of systemd and an
269 initrd is used for system boot, you should generate a new initrd before
270 rebooting the system.</para></warning>
271
272 </sect2>
273
274 <sect2 role="content">
275 <title>Contents</title>
276
277 <para>
278 A list of the installed files, along with their short
279 descriptions can be found at
280 <ulink url="&lfs-root;/chapter06/systemd.html#contents-systemd"/>.
281 </para>
282
283 <para>
284 Listed below are the newly installed libraries and directories
285 along with short descriptions.
286 </para>
287
288 <segmentedlist>
289 <segtitle>Installed Programs</segtitle>
290 <segtitle>Installed Libraries</segtitle>
291 <segtitle>Installed Directories</segtitle>
292
293 <seglistitem>
294 <seg>
295 None
296 </seg>
297 <seg>
298 pam_systemd.so
299 (in <filename class="directory">/lib/security</filename>)
300 </seg>
301 <seg>
302 None
303 </seg>
304 </seglistitem>
305 </segmentedlist>
306
307 <variablelist>
308 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
309 <?dbfo list-presentation="list"?>
310 <?dbhtml list-presentation="table"?>
311
312 <varlistentry id="pam_systemd">
313 <term><filename class="libraryfile">pam_systemd.so</filename></term>
314 <listitem>
315 <para>
316 is a PAM module used to register user sessions with the
317 <application>systemd</application> login manager,
318 <command>systemd-logind</command>.
319 </para>
320 <indexterm zone="systemd pam_systemd">
321 <primary sortas="c-pam_systemd">pam_systemd.so</primary>
322 </indexterm>
323 </listitem>
324 </varlistentry>
325
326 </variablelist>
327
328 </sect2>
329
330</sect1>
Note: See TracBrowser for help on using the repository browser.