source: networking/netutils/networkmanager.xml@ 34fe2633

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

Update to libmypaint-1.5.0.
Update to ModemManager-1.12.6.

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

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