source: networking/netutils/networkmanager.xml@ 372597e

10.0 10.1 11.0 11.1 9.1 lazarus qt5new trunk upgradedb xry111/intltool xry111/test-20220226
Last change on this file since 372597e was 372597e, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Update to xvidcore-1.3.7.
Update to poppler-0.84.0.
Update to doxygen-1.8.17.
Update to ruby-2.7.0.
Update to NetworkManager-1.22.2.

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

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