source: networking/netutils/networkmanager.xml@ 6e1270b

11.0 11.1 11.2 lazarus plabs/python-mods qt5new trunk upgradedb xry111/intltool xry111/soup3 xry111/test-20220226
Last change on this file since 6e1270b was 6e1270b, checked in by Bruce Dubbs <bdubbs@…>, 16 months ago

Package updates.
Update to SDL2-2.0.16.
Update to NetworkManager-1.32.8.
Update to libjpeg-turbo-2.1.1.
Update to c-ares-1.17.2.

  • Property mode set to 100644
File size: 22.6 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/&NetworkManager-minor;/NetworkManager-&NetworkManager-version;.tar.xz">
9 <!ENTITY NetworkManager-download-ftp
10"&gnome-download-ftp;/NetworkManager/&NetworkManager-minor;/NetworkManager-&NetworkManager-version;.tar.xz">
11 <!ENTITY NetworkManager-md5sum "82d0943820df2d7cba9aed5a2d808cd0">
12 <!ENTITY NetworkManager-size "5.0 MB">
13 <!ENTITY NetworkManager-buildsize "260 MB (with tests)">
14 <!ENTITY NetworkManager-time "0.5 SBU (add 0.2 SBU for tests; both using parallelism=4)">
15]>
16
17<sect1 id="NetworkManager" xreflabel="NetworkManager-&NetworkManager-version;">
18 <?dbhtml filename="networkmanager.html"?>
19
20 <sect1info>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>NetworkManager-&NetworkManager-version;</title>
25
26 <indexterm zone="NetworkManager">
27 <primary sortas="a-NetworkManager">NetworkManager</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to NetworkManager</title>
32
33 <para>
34 <application>NetworkManager</application> is a set of co-operative
35 tools that make networking simple and straightforward. Whether you use WiFi,
36 wired, 3G, or Bluetooth, NetworkManager allows you to quickly move from
37 one network to another: Once a network has been configured and joined
38 once, it can be detected and re-joined automatically the next time it's
39 available.
40 </para>
41
42 &lfs101_checked;
43
44 <note revision="systemd">
45 <para>
46 Make sure that you disable the <command>systemd-networkd</command>
47 service or configure it not to manage the interfaces you want to manage
48 with <application>NetworkManager</application>.
49 </para>
50 </note>
51
52 <bridgehead renderas="sect3">Package Information</bridgehead>
53 <itemizedlist spacing="compact">
54 <listitem>
55 <para>
56 Download (HTTP): <ulink url="&NetworkManager-download-http;"/>
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download (FTP): <ulink url="&NetworkManager-download-ftp;"/>
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Download MD5 sum: &NetworkManager-md5sum;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Download size: &NetworkManager-size;
72 </para>
73 </listitem>
74 <listitem>
75 <para>
76 Estimated disk space required: &NetworkManager-buildsize;
77 </para>
78 </listitem>
79 <listitem>
80 <para>
81 Estimated build time: &NetworkManager-time;
82 </para>
83 </listitem>
84 </itemizedlist>
85
86 <bridgehead renderas="sect3">NetworkManager Dependencies</bridgehead>
87
88 <bridgehead renderas="sect4">Required</bridgehead>
89 <para role="required">
90 <xref linkend="jansson"/> and
91 <xref linkend="libndp"/>
92 </para>
93
94 <bridgehead renderas="sect4">Recommended</bridgehead>
95 <para role="recommended">
96 <xref linkend="curl"/>,
97 <!--<xref linkend="dhcpcd"/> or
98 DHCPCD support is known to be broken with dhcpcd-9 -->
99 <xref role="nodep" linkend="dhcp"/> (client only),
100 <xref linkend="gobject-introspection"/>,
101 <xref linkend="iptables"/>,
102 <xref linkend="newt"/> (for <command>nmtui</command>),
103 <xref linkend="nss"/>,
104 <xref linkend="polkit"/>,
105 <xref linkend="pygobject3"/>,
106 <phrase revision="sysv"><xref linkend="elogind"/>,</phrase>
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="dbus-python"/> (for the test suite),
117 <!-- <xref linkend="firewalld"/> (For whenever firewalld is reintroduced) -->
118 <xref linkend="gnutls"/> (used if <xref linkend="nss"/> is not found),
119 <xref linkend="gtk-doc"/>,
120 <xref linkend="libpsl"/>,
121 <xref linkend="qt5"/> (for examples),
122 <xref linkend="ModemManager"/>,
123 <xref linkend="valgrind"/>,
124 <ulink url="http://www.thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</ulink>,
125 <ulink url="https://firewalld.org/">firewalld</ulink>,
126 <ulink url="https://github.com/Distrotech/libaudit">libaudit</ulink>,
127 <ulink url="https://github.com/jpirko/libteam">libteam</ulink>,
128 <ulink url="&gnome-download-http;/mobile-broadband-provider-info/">mobile-broadband-provider-info</ulink>,
129 <ulink url="https://www.samba.org/ftp/ppp/">PPP</ulink>, and
130 <ulink url="https://dianne.skoll.ca/projects/rp-pppoe/">RP-PPPoE</ulink>
131 </para>
132
133 <para condition="html" role="usernotes">User Notes:
134 <ulink url="&blfs-wiki;/NetworkManager"/>
135 </para>
136 </sect2>
137
138 <sect2 role="kernel" id="NetworkManager-kernel">
139 <title>Kernel Configuration</title>
140
141 <para>
142 If you wish to run the tests, enable the following options in the
143 kernel configuration and recompile the kernel if necessary:
144 </para>
145
146 <!-- Ethernet Teaming support is potentially optional, but I didn't
147 run the tests again to test that. It was needed to convince one of
148 the Linux Platform tests to move farther along because otherwise
149 RTNETLINK would respond with an Error 95 - unknown device type.
150 This would cause the test to fail early on in the process. -->
151
152<screen><literal>Device Drivers ---&gt;
153 [*] Network device support [CONFIG_NETDEVICES] ---&gt;
154 [*] Bonding driver support [CONFIG_BONDING]
155 [*] Dummy net driver support [CONFIG_DUMMY]
156 [*] Ethernet team driver support [CONFIG_NET_TEAM]</literal></screen>
157
158 <indexterm zone="NetworkManager NetworkManager-kernel">
159 <primary sortas="d-NetworkManager">NetworkManager</primary>
160 </indexterm>
161 </sect2>
162
163 <sect2 role="installation">
164 <title>Installation of NetworkManager</title>
165
166 <para>
167 If <xref linkend="qt5"/> is installed and the Qt based
168 examples are desired, fix two meson.build files:
169 </para>
170
171<screen><userinput>sed -e 's/-qt4/-qt5/' \
172 -e 's/moc_location/host_bins/' \
173 -i examples/C/qt/meson.build &amp;&amp;
174
175sed -e 's/Qt/&amp;5/' \
176 -i meson.build</userinput></screen>
177
178 <para>
179 Fix a missing meson.build file for initrd hooks (not used in BLFS):
180 </para>
181
182<screen><userinput>sed '/initrd/d' -i src/core/meson.build</userinput></screen>
183
184 <para>
185 Fix the python scripts so that they use <application>Python
186 3</application>:
187 </para>
188
189<screen><userinput>grep -rl '^#!.*python$' | xargs sed -i '1s/python/&amp;3/'</userinput></screen>
190
191 <para>
192 Install <application>NetworkManager</application> by running the
193 following commands:
194 </para>
195
196<screen revision="sysv"><userinput>mkdir build &amp;&amp;
197cd build &amp;&amp;
198
199CXXFLAGS+="-O2 -fPIC" \
200meson --prefix=/usr \
201 --buildtype=release \
202 -Dlibaudit=no \
203 -Dlibpsl=false \
204 -Dnmtui=true \
205 -Dovs=false \
206 -Dppp=false \
207 -Dselinux=false \
208 -Dsession_tracking=elogind \
209 -Dmodem_manager=false \
210 -Dsystemdsystemunitdir=no \
211 -Dsystemd_journal=false \
212 -Dqt=false \
213 .. &amp;&amp;
214ninja</userinput></screen>
215
216<screen revision="systemd"><userinput>mkdir build &amp;&amp;
217cd build &amp;&amp;
218
219CXXFLAGS+="-O2 -fPIC" \
220meson --prefix=/usr \
221 --buildtype=release \
222 -Dlibaudit=no \
223 -Dlibpsl=false \
224 -Dnmtui=true \
225 -Dovs=false \
226 -Dppp=false \
227 -Dselinux=false \
228 -Dqt=false \
229 -Dsession_tracking=systemd \
230 -Dmodem_manager=false \
231 .. &amp;&amp;
232ninja</userinput></screen>
233
234 <para>
235 An already active graphical session
236 with a bus address is necessary to run the tests. To test the results,
237 as the root user, <!-- needs the "ip" command -->
238 issue: <command>ninja test</command>. Six tests,
239 <filename>platform/test-tc-linux</filename>,
240 <filename>platform/test-core</filename>,
241 <filename>test-l3cfg</filename>,
242 <filename>devices/test-acd</filename>,
243 <filename>platform/test-route-linux</filename>, and
244 <filename>platform/test-link-linux</filename>,
245 <!--<filename>platform/test-cleanup-linux</filename>,--> are known to fail.
246 </para>
247
248 <para>
249 Now, as the <systemitem class="username">root</systemitem> user:
250 </para>
251
252<screen role="root"><userinput>ninja install &amp;&amp;
253mv -v /usr/share/doc/NetworkManager{,-&NetworkManager-version;}</userinput></screen>
254
255 </sect2>
256
257 <sect2 role="commands">
258 <title>Command Explanations</title>
259
260 <para>
261 <envar>CXXFLAGS="-O2 -fPIC"</envar>: These compiler options are
262 necessary to build the Qt5 based examples.
263 </para>
264
265 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
266 href="../../xincludes/meson-buildtype-release.xml"/>
267
268 <para>
269 <option>-Ddocs=true</option>: Use this switch to enable building
270 man pages and documentation if <xref linkend="gtk-doc"/> is installed.
271 </para>
272
273 <para>
274 <parameter>-Dnmtui=true</parameter>: This parameter enables building
275 <command>nmtui</command>.
276 </para>
277
278 <para revision="sysv">
279 <parameter>-Dsystemdsystemunitdir=no</parameter> and
280 <parameter>-Dsystemd_journal=false</parameter>: systemd is not
281 used for sysv init systems.
282 </para>
283
284 <para>
285 <!--<parameter>-Djson_validation=false</parameter>, no longer recognized -->
286 <parameter>-Dlibpsl=false</parameter> and
287 <parameter>-Dovs=false</parameter>: These switches disable building with the
288 respective libraries. Remove if you have the needed libraries installed.
289 </para>
290
291<!--
292 <para>
293 <parameter>-Dlibpsl=false</parameter>: This switch is required if
294 <application>libpsl</application> is not installed. Omit this switch if
295 you have built <application>libpsl</application>.
296 </para>
297-->
298
299 <para>
300 <parameter>-Dmodem_manager=false</parameter>: This switch is requried if
301 <application>ModemManager</application> is not installed. Omit if you
302 have built <application>ModemManager</application> and
303 <application>mobile-broadband-provider-info</application>.
304 </para>
305
306 <para revision="sysv">
307 <parameter>-Dsession_tracking=elogind</parameter>: This switch
308 is used to set <command>elogind</command> as the default
309 program for session tracking.
310 </para>
311
312 <para revision="systemd">
313 <parameter>-Dsession_tracking=systemd</parameter>: This switch
314 is used to set <command>systemd-logind</command> as the default
315 program for session tracking.
316 </para>
317
318 <para revision="systemd">
319 <parameter>-Dsystemdsystemunitdir=/lib/systemd/system</parameter>:
320 This switch is used to set the correct installation directory for
321 systemd units.
322 </para>
323
324 <para>
325 <parameter>-Dppp=false</parameter>: This parameter disables
326 <application>PPP</application> support in
327 <application>NetworkManager</application>.
328 </para>
329
330 <para>
331 <parameter>-Dlibaudit=no</parameter> and
332 <parameter>-Dselinux=false</parameter>: libaudit and SELinux are not used
333 in BLFS.
334 </para>
335
336 <para>
337 <parameter>-Dqt=false</parameter>: disables the
338 <application>QT</application> examples. Omit if you have
339 <application>QT</application> available and wish to install the examples.
340 </para>
341
342 </sect2>
343
344 <sect2 role="configuration">
345 <title>Configuring NetworkManager</title>
346
347 <sect3 id="NetworkManager-config">
348 <title>Config Files</title>
349 <para>
350 <filename>/etc/NetworkManager/NetworkManager.conf</filename>
351 </para>
352
353 <indexterm zone="NetworkManager NetworkManager-config">
354 <primary
355 sortas="e-etc-NetworkManager-NetworkManager.conf">
356 /etc/NetworkManager/NetworkManager.conf</primary>
357 </indexterm>
358
359 </sect3>
360
361 <sect3><title>Configuration Information</title>
362
363 <para>
364 For <application>NetworkManager</application> to work, at least
365 a minimal configuration file must be present. Such a file is not
366 installed with <command>make install</command>. Issue the following
367 command as the <systemitem class="username">root</systemitem> user to
368 create a minimal <filename>NetworkManager.conf</filename> file:
369 </para>
370
371<screen role="root"><userinput>cat &gt;&gt; /etc/NetworkManager/NetworkManager.conf &lt;&lt; "EOF"
372<literal>[main]
373plugins=keyfile</literal>
374EOF</userinput></screen>
375
376 <para>
377 This file should not be modified directly by users of the system.
378 Instead, system specific changes should be made using configuration
379 files in the
380 <filename class="directory">/etc/NetworkManager/conf.d</filename>
381 directory.
382 </para>
383
384 <para>
385 To allow polkit to manage authorizations, add the following
386 configuration file:
387 </para>
388
389<screen role="root"><userinput>cat &gt; /etc/NetworkManager/conf.d/polkit.conf &lt;&lt; "EOF"
390<literal>[main]
391auth-polkit=true</literal>
392EOF</userinput></screen>
393
394 <para>
395 To use something other than the built-in dhcp client (recommended if
396 using only <command>nmcli</command>), use the following configuration
397 (valid values include either dhclient <!--dhcpcd --> or internal):
398 </para>
399
400<screen role="nodump"><userinput>cat &gt; /etc/NetworkManager/conf.d/dhcp.conf &lt;&lt; "EOF"
401<literal>[main]
402dhcp=</literal><replaceable>dhclient</replaceable>
403EOF</userinput></screen>
404
405 <para>
406 To prevent <application>NetworkManager</application> from updating the
407 <filename>/etc/resolv.conf</filename> file, add the following
408 configuration file:
409 </para>
410
411<screen role="nodump"><userinput>cat &gt; /etc/NetworkManager/conf.d/no-dns-update.conf &lt;&lt; "EOF"
412<literal>[main]
413dns=none</literal>
414EOF</userinput></screen>
415
416 <para>
417 For additional configuation options, see
418 <command>man 5 NetworkManager.conf</command>.
419 </para>
420
421 <para>
422 To allow regular users to configure network connections,
423 you should add them to the
424 <systemitem class="groupname">netdev</systemitem>
425 group, and create a <application>polkit</application> rule that grants
426 access. Run the following commands as the
427 <systemitem class="username">root</systemitem> user:
428 </para>
429
430<screen role="root"><userinput>groupadd -fg 86 netdev &amp;&amp;
431/usr/sbin/usermod -a -G netdev <replaceable>&lt;username&gt;</replaceable>
432
433cat &gt; /usr/share/polkit-1/rules.d/org.freedesktop.NetworkManager.rules &lt;&lt; "EOF"
434<literal>polkit.addRule(function(action, subject) {
435 if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 &amp;&amp; subject.isInGroup("netdev")) {
436 return polkit.Result.YES;
437 }
438});</literal>
439EOF</userinput></screen>
440
441 </sect3>
442
443 <sect3 id="NetworkManager-init">
444 <title><phrase revision="sysv">Boot Script</phrase>
445 <phrase revision="systemd">Systemd Unit</phrase></title>
446
447 <para revision="sysv">
448 To automatically start the <command>NetworkManager</command> daemon
449 when the system is rebooted, install the
450 <filename>/etc/rc.d/init.d/networkmanager</filename>bootscript from the
451 <xref linkend="bootscripts"/> package.
452 </para>
453
454 <para revision="systemd">
455 To start the <command>NetworkManager</command> daemon at boot, enable
456 the previously installed systemd unit by running the following command
457 as the <systemitem class="username">root</systemitem> user:
458 </para>
459
460 <note>
461 <para>
462 If using <application>Network Manager</application> to manage
463 an interface, any previous configuration for that interface should be
464 removed, and the interface brought down prior to starting
465 <application>Network Manager</application>.
466 </para>
467 </note>
468
469 <indexterm zone="NetworkManager NetworkManager-init">
470 <primary sortas="f-NetworkManager">NetworkManager</primary>
471 </indexterm>
472
473<screen role="root" revision="sysv"><userinput>make install-networkmanager</userinput></screen>
474
475<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager</userinput></screen>
476<!-- The below instruction is obsolete. NetworkManager-wait-online is now
477 enabled by default when enabling NetworkManager. -->
478<!--
479 <para revision="systemd">
480 <application>NetworkManager</application> also ships a systemd unit
481 called <filename>NetworkManager-wait-online.service</filename> which
482 can be used to prevent services that require network connectivity
483 from starting until <application>NetworkManager</application> has
484 established the connection. To enable it, run the following command
485 as the <systemitem class="username">root</systemitem> user:
486 </para>
487
488<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager-wait-online</userinput></screen>
489 -->
490 <!-- As such, let's now provide instructions on how to disable that
491 behavior, for those who wish to do so. -->
492 <para revision="systemd">
493 Starting in version 1.11.2 of <application>NetworkManager</application>,
494 a systemd unit named <filename>NetworkManager-wait-online.service</filename>
495 is enabled, which is used to prevent services that require network
496 connectivity from starting until <application>NetworkManager</application>
497 establishes a connection. To disable this behavior, run the following
498 command as the <systemitem class="username">root</systemitem> user:
499 </para>
500
501<screen role="root" revision="systemd"><userinput>systemctl disable NetworkManager-wait-online</userinput></screen>
502
503 </sect3>
504
505 </sect2>
506
507 <sect2 role="content">
508 <title>Contents</title>
509
510 <segmentedlist>
511 <segtitle>Installed Programs</segtitle>
512 <segtitle>Installed Libraries</segtitle>
513 <segtitle>Installed Directories</segtitle>
514
515 <seglistitem>
516 <seg>
517 NetworkManager, nmcli, nm-online, nmtui, and, symlinked to nmtui:
518 nmtui-connect, nmtui-edit, and nmtui-hostname
519 </seg>
520 <seg>
521 libnm.so
522 and several modules under /usr/lib/NetworkManager
523 </seg>
524 <seg>
525 /etc/NetworkManager,
526 /usr/include/libnm,
527 /usr/lib/NetworkManager,
528 /usr/share/doc/NetworkManager-&NetworkManager-version;,
529 /usr/share/gtk-doc/html/{libnm,NetworkManager}
530 (if the documentation is built),
531 and
532 /var/lib/NetworkManager
533 </seg>
534 <!-- A lot of libraries were removed here. We should verify compatibilty.
535 RESTORED AT 1.18.2 -renodr -->
536 </seglistitem>
537 </segmentedlist>
538
539 <variablelist>
540 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
541 <?dbfo list-presentation="list"?>
542 <?dbhtml list-presentation="table"?>
543
544 <varlistentry id="nmcli">
545 <term><command>nmcli</command></term>
546 <listitem>
547 <para>
548 is a command-line tool for controlling
549 <application>NetworkManager</application>
550 and getting its status
551 </para>
552 <indexterm zone="NetworkManager nmcli">
553 <primary sortas="b-nmcli">nmcli</primary>
554 </indexterm>
555 </listitem>
556 </varlistentry>
557
558 <varlistentry id="nm-online">
559 <term><command>nm-online</command></term>
560 <listitem>
561 <para>
562 is an utility to determine whether you are online
563 </para>
564 <indexterm zone="NetworkManager nm-online">
565 <primary sortas="b-nm-online">nm-online</primary>
566 </indexterm>
567 </listitem>
568 </varlistentry>
569
570 <varlistentry id="nmtui">
571 <term><command>nmtui</command></term>
572 <listitem>
573 <para>
574 is an interactive ncurses-based user interface for
575 <application>nmcli</application>
576 </para>
577 <indexterm zone="NetworkManager nmtui">
578 <primary sortas="b-nmtui">nmtui</primary>
579 </indexterm>
580 </listitem>
581 </varlistentry>
582
583 <varlistentry id="nmtui-connect">
584 <term><command>nmtui-connect</command></term>
585 <listitem>
586 <para>
587 is an interactive ncurses-based user interface to
588 activate/deactivate connections
589 </para>
590 <indexterm zone="NetworkManager nmtui-connect">
591 <primary sortas="b-nmtui-connect">nmtui-connect</primary>
592 </indexterm>
593 </listitem>
594 </varlistentry>
595
596 <varlistentry id="nmtui-edit">
597 <term><command>nmtui-edit</command></term>
598 <listitem>
599 <para>
600 is an interactive ncurses-based user interface to edit connections
601 </para>
602 <indexterm zone="NetworkManager nmtui-edit">
603 <primary sortas="b-nmtui-edit">nmtui-edit</primary>
604 </indexterm>
605 </listitem>
606 </varlistentry>
607
608 <varlistentry id="nmtui-hostname">
609 <term><command>nmtui-hostname</command></term>
610 <listitem>
611 <para>
612 is an interactive ncurses-based user interface to edit the hostname
613 </para>
614 <indexterm zone="NetworkManager nmtui-hostname">
615 <primary sortas="b-nmtui-hostname">nmtui-hostname</primary>
616 </indexterm>
617 </listitem>
618 </varlistentry>
619
620 <varlistentry id="NetworkManager-prog">
621 <term><command>NetworkManager</command></term>
622 <listitem>
623 <para>
624 is the network management daemon
625 </para>
626 <indexterm zone="NetworkManager NetworkManager-prog">
627 <primary sortas="b-NetworkManager">NetworkManager</primary>
628 </indexterm>
629 </listitem>
630 </varlistentry>
631
632 <varlistentry id="libnm">
633 <term><filename class="libraryfile">libnm.so</filename></term>
634 <listitem>
635 <para>
636 contains functions used by <application>NetworkManager</application>
637 </para>
638 <indexterm zone="NetworkManager libnm">
639 <primary sortas="c-libnm">libnm.so</primary>
640 </indexterm>
641 </listitem>
642 </varlistentry>
643 </variablelist>
644
645 </sect2>
646
647</sect1>
Note: See TracBrowser for help on using the repository browser.