source: networking/netutils/networkmanager.xml@ 19613b0

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.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 19613b0 was 19613b0, checked in by Xi Ruoyao <xry111@…>, 4 years ago

meson: remove useless options, for untagged packages

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

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