source: networking/netutils/networkmanager.xml@ fdbfe39

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 fdbfe39 was fdbfe39, checked in by Pierre Labastie <pieere@…>, 3 years ago

Force NetworkManager to use Python 3

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

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