source: networking/netutils/networkmanager.xml@ d267a13

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 8.4 9.0 9.1 bdubbs/svn elogind gimp3 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since d267a13 was d267a13, checked in by DJ Lucas <dj@…>, 6 years ago

Update to NetworkManager-1.14.2. Fixes #11150.
Include pam_keyinit.so in systemd-logind PAM configuration.

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

  • Property mode set to 100644
File size: 17.0 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 NetworkManager-download-http
8 "&gnome-download-http;/NetworkManager/1.12/NetworkManager-&NetworkManager-version;.tar.xz">
9 <!ENTITY NetworkManager-download-ftp
10 "&gnome-download-ftp;/NetworkManager/1.12/NetworkManager-&NetworkManager-version;.tar.xz">
11 <!ENTITY NetworkManager-md5sum "89efab4ecfa061925e926d11976ee1b8">
12 <!ENTITY NetworkManager-size "4.2 MB">
13 <!ENTITY NetworkManager-buildsize "741 MB (with tests)">
14 <!ENTITY NetworkManager-time "0.5 SBU (with tests)">
15]>
16
17<sect1 id="NetworkManager" xreflabel="NetworkManager-&NetworkManager-version;">
18 <?dbhtml filename="networkmanager.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>NetworkManager-&NetworkManager-version;</title>
26
27 <indexterm zone="NetworkManager">
28 <primary sortas="a-NetworkManager">NetworkManager</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to NetworkManager</title>
33
34 <para>
35 <application>NetworkManager</application> is a set of co-operative
36 tools that make networking simple and straightforward. Whether WiFi,
37 wired, 3G, or Bluetooth, NetworkManager allows you to quickly move from
38 one network to another: Once a network has been configured and joined
39 once, it can be detected and re-joined automatically the next time it's
40 available.
41 </para>
42
43 &lfs83_checked;
44
45 <note revision="systemd">
46 <para>
47 Make sure that you disable the <command>systemd-networkd</command>
48 service or configure it not to manage the interfaces you want to manage
49 with <application>NetworkManager</application>.
50 </para>
51 </note>
52
53 <bridgehead renderas="sect3">Package Information</bridgehead>
54 <itemizedlist spacing="compact">
55 <listitem>
56 <para>
57 Download (HTTP): <ulink url="&NetworkManager-download-http;"/>
58 </para>
59 </listitem>
60 <listitem>
61 <para>
62 Download (FTP): <ulink url="&NetworkManager-download-ftp;"/>
63 </para>
64 </listitem>
65 <listitem>
66 <para>
67 Download MD5 sum: &NetworkManager-md5sum;
68 </para>
69 </listitem>
70 <listitem>
71 <para>
72 Download size: &NetworkManager-size;
73 </para>
74 </listitem>
75 <listitem>
76 <para>
77 Estimated disk space required: &NetworkManager-buildsize;
78 </para>
79 </listitem>
80 <listitem>
81 <para>
82 Estimated build time: &NetworkManager-time;
83 </para>
84 </listitem>
85 </itemizedlist>
86
87 <bridgehead renderas="sect3">NetworkManager Dependencies</bridgehead>
88
89 <bridgehead renderas="sect4">Required</bridgehead>
90 <para role="required">
91 <xref linkend="dbus-glib"/> and
92 <xref linkend="libndp"/>
93 </para>
94
95 <bridgehead renderas="sect4">Recommended</bridgehead>
96 <para role="recommended">
97 <phrase revision="sysv"><xref linkend="consolekit"/>,</phrase>
98 <xref linkend="curl"/>,
99 <xref linkend="dhcpcd"/> or
100 <xref linkend="dhcp"/> (client only),
101 <xref linkend="gobject-introspection"/>,
102 <xref linkend="iptables"/>,
103 <xref linkend="newt"/> (for <command>nmtui</command>),
104 <xref linkend="nss"/>,
105 <xref linkend="polkit"/>,
106 <xref linkend="pygobject3"/>,
107 <phrase revision="systemd"><xref linkend="systemd"/>,</phrase>
108 <xref linkend="upower"/>,
109 <xref linkend="vala"/>, and
110 <xref linkend="wpa_supplicant"/> (built with D-Bus support),
111 </para>
112
113 <bridgehead renderas="sect4">Optional</bridgehead>
114 <para role="optional">
115 <xref linkend="bluez"/>,
116 <xref linkend="gnutls"/> (used if <xref linkend="nss"/> is not found),
117 <xref linkend="gtk-doc"/>,
118 <xref linkend="jansson"/>,
119 <xref linkend="libpsl"/>,
120 <xref linkend="qt5"/> (for examples),
121 <xref linkend="ModemManager"/>,
122 <xref linkend="valgrind"/>,
123 <ulink url="http://www.thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</ulink>,
124 <ulink url="https://github.com/Distrotech/libaudit">libaudit</ulink>,
125 <ulink url="https://github.com/jpirko/libteam">libteam</ulink>,
126 <ulink url="https://www.samba.org/ftp/ppp/">PPP</ulink>, and
127 <ulink url="https://www.roaringpenguin.com/products/pppoe">RP-PPPoE</ulink>
128 </para>
129
130 <para condition="html" role="usernotes">User Notes:
131 <ulink url="&blfs-wiki;/NetworkManager"/>
132 </para>
133 </sect2>
134
135 <sect2 role="installation">
136 <title>Installation of NetworkManager</title>
137
138 <para>If <xref linkend="qt5"/> is installed and the Qt based
139 examples are desired, fix the configure script:</para>
140
141<screen><userinput>sed -e '/Qt[CDN]/s/Qt/Qt5/g' \
142 -e 's/-qt4/-qt5' \
143 -e 's/moc_location/host_bins/' \
144 -i examples/C/qt/meson.build</userinput></screen>
145
146 <para>
147 Fix a missing meson.build file for initrd hooks (not used in BLFS):
148 </para>
149
150<screen><userinput>sed '/initrd/d' -i src/meson.build</userinput></screen>
151
152 <para>
153 Install <application>NetworkManager</application> by running the
154 following commands:
155 </para>
156
157<screen revision="sysv"><userinput>mkdir build &amp;&amp;
158cd build &amp;&amp;
159
160CXXFLAGS+="-O2 -fPIC" \
161meson --prefix /usr \
162 --sysconfdir /etc \
163 --localstatedir /var \
164 -Dnmtui=true \
165 -Dppp=false \
166 -Dlibaudit=no \
167 -Dlibnm_glib=true \
168 -Dselinux=false \
169 -Dudev_dir=/lib/udev \
170 -Dsession_tracking=no \
171 -Dsystemdsystemunitdir=no \
172 -Dsystemd_journal=false \
173 -Dqt=false \
174 .. &amp;&amp;
175ninja</userinput></screen>
176
177<screen revision="systemd"><userinput>mkdir build &amp;&amp;
178cd build &amp;&amp;
179
180CXXFLAGS+="-O2 -fPIC" \
181meson --prefix /usr \
182 --sysconfdir /etc \
183 --localstatedir /var \
184 -Dnmtui=true \
185 -Dppp=false \
186 -Dlibaudit=no \
187 -Dlibnm_glib=true \
188 -Dselinux=false \
189 -Dqt=false \
190 -Dudev_dir=/lib/udev \
191 -Dsession_tracking=systemd \
192 -Dsystemdsystemunitdir=/lib/systemd/system \
193 .. &amp;&amp;
194ninja</userinput></screen>
195
196 <para>
197 An already active graphical session with bus address is necessary to run
198 the tests. To test the results, issue: <command>make check</command>.
199 </para>
200
201 <para>
202 Now, as the <systemitem class="username">root</systemitem> user:
203 </para>
204
205<screen role="root"><userinput>ninja install &amp;&amp;
206mv -v /usr/share/doc/NetworkManager{,-&NetworkManager-version;}</userinput></screen>
207
208 </sect2>
209
210 <sect2 role="commands">
211 <title>Command Explanations</title>
212
213 <para>
214 <envar>CXXFLAGS="-O2 -fPIC"</envar>: These compiler options are
215 necessary to build the Qt5 based examples.
216 </para>
217
218 <para>
219 <parameter>-Dnmtui=true</parameter>: This parameter enables building
220 <command>nmtui</command>.
221 </para>
222
223 <para revision="sysv">
224 <parameter>-Dsession_tracking=no</parameter>,
225 <parameter>-Dsystemdsystemunitdir=no</parameter>, and
226 <parameter>-Dsystemd_journal=false</parameter>: systemd is not
227 used for sysv init systems.
228 </para>
229
230 <para revision="systemd">
231 <parameter>-Dsession_tracking=systemd</parameter>: This switch
232 is used to set <command>systemd-logind</command> as the default
233 program for session tracking.
234 </para>
235
236 <para revision="systemd">
237 <parameter>-Dsystemdsystemunitdir=/lib/systemd/system</parameter>:
238 This switch is used to set the correct installation directory for
239 systemd units.
240 </para>
241
242 <para>
243 <parameter>-Dppp=false</parameter>: This parameter disables
244 <application>PPP</application> support in
245 <application>NetworkManager</application>.
246 </para>
247
248 <para>
249 <parameter>-Dlibaudit=no</parameter> and
250 <parameter>-Dselinux=false</parameter>: libaudit and SELinux are not used
251 in BLFS.
252 </para>
253
254 <para>
255 <parameter>-Dqt=false</parameter>: disables the
256 <application>QT</application> examples. Omit if you have
257 <application>QT</application> available and wish to install the examples.
258 </para>
259
260 </sect2>
261
262 <sect2 role="configuration">
263 <title>Configuring NetworkManager</title>
264
265 <sect3 id="NetworkManager-config">
266 <title>Config Files</title>
267 <para>
268 <filename>/etc/NetworkManager/NetworkManager.conf</filename>
269 </para>
270
271 <indexterm zone="NetworkManager NetworkManager-config">
272 <primary
273 sortas="e-etc-NetworkManager-NetworkManager.conf">
274 /etc/NetworkManager/NetworkManager.conf</primary>
275 </indexterm>
276
277 </sect3>
278
279 <sect3><title>Configuration Information</title>
280
281 <para>
282 For <application>NetworkManager</application> to work, at least
283 a minimal configuration file must be present. Such file is not
284 installed with <command>make install</command>. Issue the following
285 command as the <systemitem class="username">root</systemitem> user to
286 create minimal <filename>NetworkManager.conf</filename> file:
287 </para>
288
289<screen role="root"><userinput>cat &gt;&gt; /etc/NetworkManager/NetworkManager.conf &lt;&lt; "EOF"
290<literal>[main]
291plugins=keyfile</literal>
292EOF</userinput></screen>
293
294 <para>
295 You can add <option>dns=none</option> to suppress changes to
296 <filename>/etc/resolv.conf</filename>. See
297 <command>man 5 NetworkManager.conf</command>
298 for any additional options.
299 </para>
300
301 <para>
302 To allow regular users permission to configure network connections,
303 you should add them to the
304 <systemitem class="groupname">netdev</systemitem>
305 group, and create a <application>polkit</application> rule that grants
306 access. Run the following commands as the
307 <systemitem class="username">root</systemitem> user:
308 </para>
309
310<screen role="root"><userinput>groupadd -fg 86 netdev &amp;&amp;
311/usr/sbin/usermod -a -G netdev <replaceable>&lt;username&gt;</replaceable>
312
313cat &gt; /usr/share/polkit-1/rules.d/org.freedesktop.NetworkManager.rules &lt;&lt; "EOF"
314<literal>polkit.addRule(function(action, subject) {
315 if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 &amp;&amp; subject.isInGroup("netdev")) {
316 return polkit.Result.YES;
317 }
318});</literal>
319EOF</userinput></screen>
320
321 </sect3>
322
323 <sect3 id="NetworkManager-init">
324 <title><phrase revision="sysv">Boot Script</phrase>
325 <phrase revision="systemd">Systemd Unit</phrase></title>
326
327 <para revision="sysv">
328 To automatically start the <command>NetworkManager</command> daemon
329 when the system is rebooted, install the
330 <filename>/etc/rc.d/init.d/networkmanager</filename>bootscript from the
331 <xref linkend="bootscripts"/> package.
332 </para>
333
334 <para revision="systemd">
335 To start the <command>NetworkManager</command> daemon at boot, enable
336 the previously installed systemd unit by running the following command
337 as the <systemitem class="username">root</systemitem> user:
338 </para>
339
340 <note>
341 <para>
342 If using <application>Network Manager</application> to manage
343 an interface, any previous configuration for that interface should be
344 removed, and the interface brought down prior to starting
345 <application>Network Manager</application>.
346 </para>
347 </note>
348
349 <indexterm zone="NetworkManager NetworkManager-init">
350 <primary sortas="f-NetworkManager">NetworkManager</primary>
351 </indexterm>
352
353<screen role="root" revision="sysv"><userinput>make install-networkmanager</userinput></screen>
354
355<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager</userinput></screen>
356
357 <para revision="systemd">
358 <application>NetworkManager</application> also ships a systemd unit
359 called <filename>NetworkManager-wait-online.service</filename> which
360 can be used to prevent services that require network connectivity
361 from starting until <application>NetworkManager</application> has
362 established the connection. To enable it, run the following command
363 as the <systemitem class="username">root</systemitem> user:
364 </para>
365
366<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager-wait-online</userinput></screen>
367
368 </sect3>
369
370 </sect2>
371
372 <sect2 role="content">
373 <title>Contents</title>
374
375 <segmentedlist>
376 <segtitle>Installed Programs</segtitle>
377 <segtitle>Installed Libraries</segtitle>
378 <segtitle>Installed Directories</segtitle>
379
380 <seglistitem>
381 <seg>
382 NetworkManager, nmcli, nm-online, nmtui, and, symlinked to nmtui:
383 nmtui-connect, nmtui-edit, and nmtui-hostname
384 </seg>
385 <seg>
386 libnm.so and several modules under /usr/lib/NetworkManager
387 </seg>
388 <seg>
389 /etc/NetworkManager,
390 /usr/include/libnm,
391 /usr/lib/NetworkManager,
392 /usr/share/doc/NetworkManager-&NetworkManager-version;,
393 /usr/share/gtk-doc/html/{libnm,NetworkManager}
394 (if the documentation is built),
395 and
396 /var/lib/NetworkManager
397 </seg>
398 <!-- A lot of libraries were removed here. We should verify compatibilty. -->
399 </seglistitem>
400 </segmentedlist>
401
402 <variablelist>
403 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
404 <?dbfo list-presentation="list"?>
405 <?dbhtml list-presentation="table"?>
406
407 <varlistentry id="nmcli">
408 <term><command>nmcli</command></term>
409 <listitem>
410 <para>
411 is a command-line tool for controlling
412 <application>NetworkManager</application>
413 and getting its status.
414 </para>
415 <indexterm zone="NetworkManager nmcli">
416 <primary sortas="b-nmcli">nmcli</primary>
417 </indexterm>
418 </listitem>
419 </varlistentry>
420
421 <varlistentry id="nm-online">
422 <term><command>nm-online</command></term>
423 <listitem>
424 <para>
425 is a utility to find out whether you are online.
426 </para>
427 <indexterm zone="NetworkManager nm-online">
428 <primary sortas="b-nm-online">nm-online</primary>
429 </indexterm>
430 </listitem>
431 </varlistentry>
432
433 <varlistentry id="nmtui">
434 <term><command>nmtui</command></term>
435 <listitem>
436 <para>
437 is an interactive ncurses based interface for
438 <application>nmcli</application>.
439 </para>
440 <indexterm zone="NetworkManager nmtui">
441 <primary sortas="b-nmtui">nmtui</primary>
442 </indexterm>
443 </listitem>
444 </varlistentry>
445
446 <varlistentry id="nmtui-connect">
447 <term><command>nmtui-connect</command></term>
448 <listitem>
449 <para>
450 is an interactive ncurses based interface connection to
451 activate/deactivate connections.
452 </para>
453 <indexterm zone="NetworkManager nmtui-connect">
454 <primary sortas="b-nmtui-connect">nmtui-connect</primary>
455 </indexterm>
456 </listitem>
457 </varlistentry>
458
459 <varlistentry id="nmtui-edit">
460 <term><command>nmtui-edit</command></term>
461 <listitem>
462 <para>
463 is an interactive ncurses based interface connection editor.
464 </para>
465 <indexterm zone="NetworkManager nmtui-edit">
466 <primary sortas="b-nmtui-edit">nmtui-edit</primary>
467 </indexterm>
468 </listitem>
469 </varlistentry>
470
471 <varlistentry id="nmtui-hostname">
472 <term><command>nmtui-hostname</command></term>
473 <listitem>
474 <para>
475 is an interactive ncurses based interface hostname editor.
476 </para>
477 <indexterm zone="NetworkManager nmtui-hostname">
478 <primary sortas="b-nmtui-hostname">nmtui-hostname</primary>
479 </indexterm>
480 </listitem>
481 </varlistentry>
482
483 <varlistentry id="NetworkManager-prog">
484 <term><command>NetworkManager</command></term>
485 <listitem>
486 <para>
487 is the network management daemon.
488 </para>
489 <indexterm zone="NetworkManager NetworkManager-prog">
490 <primary sortas="b-NetworkManager">NetworkManager</primary>
491 </indexterm>
492 </listitem>
493 </varlistentry>
494
495 <varlistentry id="libnm">
496 <term><filename class="libraryfile">libnm.so</filename></term>
497 <listitem>
498 <para>
499 contains functions used by <application>NetworkManager</application>.
500 </para>
501 <indexterm zone="NetworkManager libnm">
502 <primary sortas="c-libnm">libnm.so</primary>
503 </indexterm>
504 </listitem>
505 </varlistentry>
506
507 </variablelist>
508
509 </sect2>
510
511</sect1>
Note: See TracBrowser for help on using the repository browser.