source: networking/netutils/networkmanager.xml@ 0515763

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.1 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/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 0515763 was 0515763, checked in by Bruce Dubbs <bdubbs@…>, 4 years ago

Update to NetworkManager-1.22.4.
Update to grantlee-5.2.0.
Update to btrfs-progs-v5.4.1.
Update to mesa-19.3.2.

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

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