source: networking/netutils/networkmanager.xml@ 3757ae7

elogind
Last change on this file since 3757ae7 was 3757ae7, checked in by DJ Lucas <dj@…>, 6 years ago

Merge to TRUNK 20860.

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