source: networking/netutils/networkmanager.xml@ d6d0a2cb

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

Add Jansson

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

  • Property mode set to 100644
File size: 17.9 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.12/NetworkManager-&NetworkManager-version;.tar.xz">
9 <!ENTITY NetworkManager-download-ftp
10 "&gnome-download-ftp;/NetworkManager/1.12/NetworkManager-&NetworkManager-version;.tar.xz">
11 <!ENTITY NetworkManager-md5sum "94d02b80b120f166927e6ef242b29a9b">
12 <!ENTITY NetworkManager-size "4.0 MB">
13 <!ENTITY NetworkManager-buildsize "648 MB (with tests)">
14 <!ENTITY NetworkManager-time "2.2 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"/>,
92 <xref linkend="libndp"/>,
93 <xref linkend="libnl"/>, and
94 <xref linkend="nss"/>
95 </para>
96
97 <bridgehead renderas="sect4">Recommended</bridgehead>
98 <para role="recommended">
99 <phrase revision="sysv"><xref linkend="consolekit"/>,</phrase>
100 <xref linkend="curl"/>,
101 <xref linkend="dhcpcd"/> or
102 <xref linkend="dhcp"/> (client only),
103 <xref linkend="gobject-introspection"/>,
104 <xref linkend="iptables"/>,
105 <xref linkend="newt"/> (for <command>nmtui</command>),
106 <xref linkend="polkit"/>,
107 <xref linkend="pygobject3"/>,
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="gtk-doc"/>,
118 <xref linkend="jansson"/>,
119 <xref linkend="libpsl"/>,
120 <xref linkend="qt5"/> (for examples),
121 <xref linkend="ModemManager"/>,
122 <xref linkend="valgrind"/>,
123 <ulink url="http://www.thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</ulink>,
124<!-- <ulink url="http://www.digip.org/jansson/">Jansson</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/moc_location/host_bins/' \
144 -i configure</userinput></screen>
145
146 <para>
147 Install <application>NetworkManager</application> by running the
148 following commands:
149 </para>
150
151<screen revision="sysv"><userinput>sed -i 's/1,12,2/1,12.2/' libnm-core/nm-version.h &amp;&amp;
152CXXFLAGS="-O2 -fPIC" \
153./configure --prefix=/usr \
154 --sysconfdir=/etc \
155 --localstatedir=/var \
156 --with-nmtui \
157 --with-libnm-glib \
158 --disable-ppp \
159 --disable-json-validation \
160 --disable-ovs \
161 --with-udev-dir=/lib/udev \
162 --with-systemdsystemunitdir=no \
163 --docdir=/usr/share/doc/network-manager-&NetworkManager-version; &amp;&amp;
164make</userinput></screen>
165
166<screen revision="systemd"><userinput>sed -i 's/1,12,2/1,12.2/' libnm-core/nm-version.h &amp;&amp;
167CXXFLAGS="-O2 -fPIC" \
168./configure --prefix=/usr \
169 --sysconfdir=/etc \
170 --localstatedir=/var \
171 --with-nmtui \
172 --with-libnm-glib \
173 --disable-ppp \
174 --disable-json-validation \
175 --disable-ovs \
176 --with-udev-dir=/lib/udev \
177 --with-session-tracking=systemd \
178 --with-systemdsystemunitdir=/lib/systemd/system \
179 --docdir=/usr/share/doc/network-manager-&NetworkManager-version; &amp;&amp;
180make</userinput></screen>
181
182 <para>
183 An already active graphical session with bus address is necessary to run
184 the tests. To test the results, issue: <command>make check</command>.
185 </para>
186
187 <para>
188 Now, as the <systemitem class="username">root</systemitem> user:
189 </para>
190
191<screen role="root"><userinput>make install</userinput></screen>
192
193 </sect2>
194
195 <sect2 role="commands">
196 <title>Command Explanations</title>
197
198 <para>
199 <envar>CXXFLAGS="-O2 -fPIC"</envar>: These compiler options are
200 necessary to build the Qt5 based examples.
201 </para>
202
203 <para>
204 <parameter>--with-nmtui</parameter>: This parameter enables building
205 <command>nmtui</command>.
206 </para>
207
208 <para revision="systemd">
209 <parameter>--with-session-tracking=systemd</parameter>: This switch
210 is used to set <command>systemd-logind</command> as the default
211 program for session tracking.
212 </para>
213
214 <para revision="sysv">
215 <parameter>--with-systemdsystemunitdir=no</parameter>: systemd is not
216 used for sysv init systems.
217 </para>
218
219 <para revision="systemd">
220 <parameter>--with-systemdsystemunitdir=/lib/systemd/system</parameter>:
221 This switch is used to set the correct installation directory for
222 systemd units.
223 </para>
224
225 <para>
226 <parameter>--disable-ppp</parameter>: This parameter disables
227 <application>PPP</application> support in
228 <application>NetworkManager</application>.
229 </para>
230
231 <para>
232 <parameter>--disable-json-validation</parameter>: This parameter allows
233 building without <application>Jansson</application>, which is needed
234 for <quote>team</quote> configuration validation (team is one way
235 of bonding network interfaces for increased throughput).
236 </para>
237
238 <para>
239 <parameter>--disable-ovs</parameter>: This paramenter disables
240 <application>Open Virtual Switch</application> support because it
241 requires <application>Jansson</application> which is not available in
242 BLFS.
243 </para>
244
245 <para>
246 <option>--enable-gtk-doc</option>: Use this switch if you have installed
247 <xref linkend="gtk-doc"/> and wish to build the API manuals.
248 </para>
249
250 <para>
251 <option>--without-iptables</option>: Use this switch if you don't have
252 <application>Iptables</application> installed.
253 </para>
254
255 <para>
256 <option>--disable-introspection</option>: Use this switch if <xref
257 linkend="gobject-introspection"/> is installed and you want to build
258 without introspection support. This also removes the need for <xref
259 linkend="pygobject3"/>.
260 </para>
261
262 </sect2>
263
264 <sect2 role="configuration">
265 <title>Configuring NetworkManager</title>
266
267 <sect3 id="NetworkManager-config">
268 <title>Config Files</title>
269 <para>
270 <filename>/etc/NetworkManager/NetworkManager.conf</filename>
271 </para>
272
273 <indexterm zone="NetworkManager NetworkManager-config">
274 <primary
275 sortas="e-etc-NetworkManager-NetworkManager.conf">
276 /etc/NetworkManager/NetworkManager.conf</primary>
277 </indexterm>
278
279 </sect3>
280
281 <sect3><title>Configuration Information</title>
282
283 <para>
284 For <application>NetworkManager</application> to work, at least
285 a minimal configuration file must be present. Such file is not
286 installed with <command>make install</command>. Issue the following
287 command as the <systemitem class="username">root</systemitem> user to
288 create minimal <filename>NetworkManager.conf</filename> file:
289 </para>
290
291<screen role="root"><userinput>cat &gt;&gt; /etc/NetworkManager/NetworkManager.conf &lt;&lt; "EOF"
292<literal>[main]
293plugins=keyfile</literal>
294EOF</userinput></screen>
295
296 <para>
297 You can add <option>dns=none</option> to suppress changes to
298 <filename>/etc/resolv.conf</filename>. See
299 <command>man 5 NetworkManager.conf</command>
300 for any additional options.
301 </para>
302
303 <para>
304 To allow regular users permission to configure network connections,
305 you should add them to the
306 <systemitem class="groupname">netdev</systemitem>
307 group, and create a <application>polkit</application> rule that grants
308 access. Run the following commands as the
309 <systemitem class="username">root</systemitem> user:
310 </para>
311
312<screen role="root"><userinput>groupadd -fg 86 netdev &amp;&amp;
313/usr/sbin/usermod -a -G netdev <replaceable>&lt;username&gt;</replaceable>
314
315cat &gt; /usr/share/polkit-1/rules.d/org.freedesktop.NetworkManager.rules &lt;&lt; "EOF"
316<literal>polkit.addRule(function(action, subject) {
317 if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 &amp;&amp; subject.isInGroup("netdev")) {
318 return polkit.Result.YES;
319 }
320});</literal>
321EOF</userinput></screen>
322
323 </sect3>
324
325 <sect3 id="NetworkManager-init">
326 <title><phrase revision="sysv">Boot Script</phrase>
327 <phrase revision="systemd">Systemd Unit</phrase></title>
328
329 <para revision="sysv">
330 To automatically start the <command>NetworkManager</command> daemon
331 when the system is rebooted, install the
332 <filename>/etc/rc.d/init.d/networkmanager</filename>bootscript from the
333 <xref linkend="bootscripts"/> package.
334 </para>
335
336 <para revision="systemd">
337 To start the <command>NetworkManager</command> daemon at boot, enable
338 the previously installed systemd unit by running the following command
339 as the <systemitem class="username">root</systemitem> user:
340 </para>
341
342 <note>
343 <para>
344 If using <application>Network Manager</application> to manage
345 an interface, any previous configuration for that interface should be
346 removed, and the interface brought down prior to starting
347 <application>Network Manager</application>.
348 </para>
349 </note>
350
351 <indexterm zone="NetworkManager NetworkManager-init">
352 <primary sortas="f-NetworkManager">NetworkManager</primary>
353 </indexterm>
354
355<screen role="root" revision="sysv"><userinput>make install-networkmanager</userinput></screen>
356
357<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager</userinput></screen>
358
359 <para revision="systemd">
360 <application>NetworkManager</application> also ships a systemd unit
361 called <filename>NetworkManager-wait-online.service</filename> which
362 can be used to prevent services that require network connectivity
363 from starting until <application>NetworkManager</application> has
364 established the connection. To enable it, run the following command
365 as the <systemitem class="username">root</systemitem> user:
366 </para>
367
368<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager-wait-online</userinput></screen>
369
370 </sect3>
371
372 </sect2>
373
374 <sect2 role="content">
375 <title>Contents</title>
376
377 <segmentedlist>
378 <segtitle>Installed Programs</segtitle>
379 <segtitle>Installed Libraries</segtitle>
380 <segtitle>Installed Directories</segtitle>
381
382 <seglistitem>
383 <seg>
384 NetworkManager, nmcli, nm-online, nmtui, and, symlinked to nmtui:
385 nmtui-connect, nmtui-edit, and nmtui-hostname
386 </seg>
387 <seg>
388 libnm.so and several modules under /usr/lib/NetworkManager
389 </seg>
390 <seg>
391 /etc/NetworkManager,
392 /usr/include/libnm,
393 /usr/lib/NetworkManager,
394 /usr/share/doc/NetworkManager-&NetworkManager-version;,
395 /usr/share/gtk-doc/html/{libnm,NetworkManager}
396 (if the documentation is built),
397 and
398 /var/lib/NetworkManager
399 </seg>
400 <!-- A lot of libraries were removed here. We should verify compatibilty. -->
401 </seglistitem>
402 </segmentedlist>
403
404 <variablelist>
405 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
406 <?dbfo list-presentation="list"?>
407 <?dbhtml list-presentation="table"?>
408
409 <varlistentry id="nmcli">
410 <term><command>nmcli</command></term>
411 <listitem>
412 <para>
413 is a command-line tool for controlling
414 <application>NetworkManager</application>
415 and getting its status.
416 </para>
417 <indexterm zone="NetworkManager nmcli">
418 <primary sortas="b-nmcli">nmcli</primary>
419 </indexterm>
420 </listitem>
421 </varlistentry>
422
423 <varlistentry id="nm-online">
424 <term><command>nm-online</command></term>
425 <listitem>
426 <para>
427 is a utility to find out whether you are online.
428 </para>
429 <indexterm zone="NetworkManager nm-online">
430 <primary sortas="b-nm-online">nm-online</primary>
431 </indexterm>
432 </listitem>
433 </varlistentry>
434
435 <varlistentry id="nmtui">
436 <term><command>nmtui</command></term>
437 <listitem>
438 <para>
439 is an interactive ncurses based interface for
440 <application>nmcli</application>.
441 </para>
442 <indexterm zone="NetworkManager nmtui">
443 <primary sortas="b-nmtui">nmtui</primary>
444 </indexterm>
445 </listitem>
446 </varlistentry>
447
448 <varlistentry id="nmtui-connect">
449 <term><command>nmtui-connect</command></term>
450 <listitem>
451 <para>
452 is an interactive ncurses based interface connection to
453 activate/deactivate connections.
454 </para>
455 <indexterm zone="NetworkManager nmtui-connect">
456 <primary sortas="b-nmtui-connect">nmtui-connect</primary>
457 </indexterm>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry id="nmtui-edit">
462 <term><command>nmtui-edit</command></term>
463 <listitem>
464 <para>
465 is an interactive ncurses based interface connection editor.
466 </para>
467 <indexterm zone="NetworkManager nmtui-edit">
468 <primary sortas="b-nmtui-edit">nmtui-edit</primary>
469 </indexterm>
470 </listitem>
471 </varlistentry>
472
473 <varlistentry id="nmtui-hostname">
474 <term><command>nmtui-hostname</command></term>
475 <listitem>
476 <para>
477 is an interactive ncurses based interface hostname editor.
478 </para>
479 <indexterm zone="NetworkManager nmtui-hostname">
480 <primary sortas="b-nmtui-hostname">nmtui-hostname</primary>
481 </indexterm>
482 </listitem>
483 </varlistentry>
484
485 <varlistentry id="NetworkManager-prog">
486 <term><command>NetworkManager</command></term>
487 <listitem>
488 <para>
489 is the network management daemon.
490 </para>
491 <indexterm zone="NetworkManager NetworkManager-prog">
492 <primary sortas="b-NetworkManager">NetworkManager</primary>
493 </indexterm>
494 </listitem>
495 </varlistentry>
496
497 <varlistentry id="libnm">
498 <term><filename class="libraryfile">libnm.so</filename></term>
499 <listitem>
500 <para>
501 contains functions used by <application>NetworkManager</application>.
502 </para>
503 <indexterm zone="NetworkManager libnm">
504 <primary sortas="c-libnm">libnm.so</primary>
505 </indexterm>
506 </listitem>
507 </varlistentry>
508
509 </variablelist>
510
511 </sect2>
512
513</sect1>
Note: See TracBrowser for help on using the repository browser.