source: networking/netutils/networkmanager.xml@ e130fead

10.0 10.1 11.0 11.1 8.4 9.0 9.1 bdubbs/svn lazarus qt5new trunk upgradedb xry111/intltool xry111/test-20220226
Last change on this file since e130fead was e130fead, checked in by Douglas R. Reno <renodr@…>, 3 years ago

Update to adwaita-icon-theme-3.30.1
Update to grilo-0.3.7
Update to gnome-online-accounts-3.30.0
Update to cheese-3.30.0
Update to gnome-menus-3.31.3
Rebase patch for liboauth (permits building with OpenSSL-1.1.x) to include a programming fix. This fixes RSA/SHA1 verification, as well as allows the test suite to pass.
Make liboauth available on sysvinit systems since Firefox will now use it
Reword the description of Bubblewrap
Add a command explanation for --with-gpm-support in newt
Typo fixes

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

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