[e33ddee] | 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 |
|
---|
[0d7900a] | 7 | <!ENTITY NetworkManager-download-http
|
---|
[eae0d6d1] | 8 | "&gnome-download-http;/NetworkManager/&NetworkManager-minor;/NetworkManager-&NetworkManager-version;.tar.xz">
|
---|
[0d7900a] | 9 | <!ENTITY NetworkManager-download-ftp
|
---|
[eae0d6d1] | 10 | "&gnome-download-ftp;/NetworkManager/&NetworkManager-minor;/NetworkManager-&NetworkManager-version;.tar.xz">
|
---|
[258b6efd] | 11 | <!ENTITY NetworkManager-md5sum "ebb368ea2f201f3e0f03c2bbf21d2c17">
|
---|
[06d900b] | 12 | <!ENTITY NetworkManager-size "6.4 MB">
|
---|
[258b6efd] | 13 | <!ENTITY NetworkManager-buildsize "279 MB (with tests and documentation)">
|
---|
[06d900b] | 14 | <!ENTITY NetworkManager-time "0.8 SBU (with tests, using parallelism=4)">
|
---|
[e33ddee] | 15 | ]>
|
---|
| 16 |
|
---|
| 17 | <sect1 id="NetworkManager" xreflabel="NetworkManager-&NetworkManager-version;">
|
---|
| 18 | <?dbhtml filename="networkmanager.html"?>
|
---|
| 19 |
|
---|
| 20 |
|
---|
| 21 | <title>NetworkManager-&NetworkManager-version;</title>
|
---|
| 22 |
|
---|
| 23 | <indexterm zone="NetworkManager">
|
---|
| 24 | <primary sortas="a-NetworkManager">NetworkManager</primary>
|
---|
| 25 | </indexterm>
|
---|
| 26 |
|
---|
| 27 | <sect2 role="package">
|
---|
| 28 | <title>Introduction to NetworkManager</title>
|
---|
| 29 |
|
---|
[7ded7e3] | 30 | <para>
|
---|
| 31 | <application>NetworkManager</application> is a set of co-operative
|
---|
[e130fead] | 32 | tools that make networking simple and straightforward. Whether you use WiFi,
|
---|
[8df33ae3] | 33 | wired, 3G, or Bluetooth, NetworkManager allows you to quickly move from
|
---|
| 34 | one network to another: Once a network has been configured and joined
|
---|
| 35 | once, it can be detected and re-joined automatically the next time it's
|
---|
| 36 | available.
|
---|
[7ded7e3] | 37 | </para>
|
---|
[e33ddee] | 38 |
|
---|
[4b6e2b2] | 39 | &lfs113_checked;
|
---|
[e33ddee] | 40 |
|
---|
[cec6657e] | 41 | <note revision="systemd">
|
---|
| 42 | <para>
|
---|
| 43 | Make sure that you disable the <command>systemd-networkd</command>
|
---|
| 44 | service or configure it not to manage the interfaces you want to manage
|
---|
| 45 | with <application>NetworkManager</application>.
|
---|
| 46 | </para>
|
---|
| 47 | </note>
|
---|
| 48 |
|
---|
[e33ddee] | 49 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 50 | <itemizedlist spacing="compact">
|
---|
| 51 | <listitem>
|
---|
[7ded7e3] | 52 | <para>
|
---|
| 53 | Download (HTTP): <ulink url="&NetworkManager-download-http;"/>
|
---|
| 54 | </para>
|
---|
[e33ddee] | 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
[7ded7e3] | 57 | <para>
|
---|
| 58 | Download (FTP): <ulink url="&NetworkManager-download-ftp;"/>
|
---|
| 59 | </para>
|
---|
[e33ddee] | 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
[7ded7e3] | 62 | <para>
|
---|
| 63 | Download MD5 sum: &NetworkManager-md5sum;
|
---|
| 64 | </para>
|
---|
[e33ddee] | 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
[7ded7e3] | 67 | <para>
|
---|
| 68 | Download size: &NetworkManager-size;
|
---|
| 69 | </para>
|
---|
[e33ddee] | 70 | </listitem>
|
---|
| 71 | <listitem>
|
---|
[7ded7e3] | 72 | <para>
|
---|
| 73 | Estimated disk space required: &NetworkManager-buildsize;
|
---|
| 74 | </para>
|
---|
[e33ddee] | 75 | </listitem>
|
---|
| 76 | <listitem>
|
---|
[7ded7e3] | 77 | <para>
|
---|
| 78 | Estimated build time: &NetworkManager-time;
|
---|
| 79 | </para>
|
---|
[e33ddee] | 80 | </listitem>
|
---|
| 81 | </itemizedlist>
|
---|
| 82 |
|
---|
| 83 | <bridgehead renderas="sect3">NetworkManager Dependencies</bridgehead>
|
---|
| 84 |
|
---|
| 85 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[d497e89] | 86 | <para role="required">
|
---|
[7be78b9a] | 87 | <xref linkend="jansson"/> and
|
---|
[d267a13] | 88 | <xref linkend="libndp"/>
|
---|
[d497e89] | 89 | </para>
|
---|
| 90 |
|
---|
| 91 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 92 | <para role="recommended">
|
---|
[c4ae27ab] | 93 | <xref linkend="curl"/>,
|
---|
[24627ba] | 94 | <!--<xref linkend="dhcpcd"/> or
|
---|
| 95 | DHCPCD support is known to be broken with dhcpcd-9 -->
|
---|
[cac7f93] | 96 | <xref role="nodep" linkend="dhcp"/> (client only),
|
---|
[4b3c4b2] | 97 | <xref linkend="gobject-introspection"/>,
|
---|
[b7d1d2b] | 98 | <xref linkend="iptables"/>,
|
---|
[696fed8] | 99 | <xref linkend="newt"/> (for <command>nmtui</command>),
|
---|
[d267a13] | 100 | <xref linkend="nss"/>,
|
---|
[6e1616e2] | 101 | <xref linkend="polkit"/>,
|
---|
[b528d0f4] | 102 | <xref linkend="pygobject3"/>,
|
---|
[51dfb3e] | 103 | <phrase revision="sysv"><xref linkend="elogind"/>,</phrase>
|
---|
[cec6657e] | 104 | <phrase revision="systemd"><xref linkend="systemd"/>,</phrase>
|
---|
[f3429309] | 105 | <xref linkend="upower"/>,
|
---|
[626bb04] | 106 | <xref linkend="vala"/>, and
|
---|
[9a381c8] | 107 | <xref linkend="wpa_supplicant"/> (runtime, built with D-Bus support)
|
---|
[d497e89] | 108 | </para>
|
---|
[e33ddee] | 109 |
|
---|
[d0880dfa] | 110 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[d497e89] | 111 | <para role="optional">
|
---|
[d4f4107] | 112 | <xref linkend="bluez"/>,
|
---|
[e64cabd] | 113 | <xref linkend="dbus-python"/> (for the test suite),
|
---|
[4a9054a8] | 114 | <!-- <xref linkend="firewalld"/> (For whenever firewalld is reintroduced) -->
|
---|
[d267a13] | 115 | <xref linkend="gnutls"/> (used if <xref linkend="nss"/> is not found),
|
---|
[d497e89] | 116 | <xref linkend="gtk-doc"/>,
|
---|
[1ad3510e] | 117 | <xref linkend="libpsl"/>,
|
---|
[e4d2b8d] | 118 | <xref linkend="qt5"/> (for examples),
|
---|
[7d645679] | 119 | <xref linkend="ModemManager"/>,
|
---|
[acb3e9f] | 120 | <xref linkend="valgrind"/>,
|
---|
[75e3e09] | 121 | <ulink url="https://thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</ulink>,
|
---|
[365c6fb] | 122 | <ulink url="https://firewalld.org/">firewalld</ulink>,
|
---|
[262a108] | 123 | <ulink url="https://github.com/Distrotech/libaudit">libaudit</ulink>,
|
---|
[4f5369a] | 124 | <ulink url="https://github.com/jpirko/libteam">libteam</ulink>,
|
---|
[01701da9] | 125 | <ulink url="&gnome-download-http;/mobile-broadband-provider-info/">mobile-broadband-provider-info</ulink>,
|
---|
[cec6657e] | 126 | <ulink url="https://www.samba.org/ftp/ppp/">PPP</ulink>, and
|
---|
[e130fead] | 127 | <ulink url="https://dianne.skoll.ca/projects/rp-pppoe/">RP-PPPoE</ulink>
|
---|
[d497e89] | 128 | </para>
|
---|
[d0880dfa] | 129 |
|
---|
[e33ddee] | 130 | <para condition="html" role="usernotes">User Notes:
|
---|
[7ded7e3] | 131 | <ulink url="&blfs-wiki;/NetworkManager"/>
|
---|
| 132 | </para>
|
---|
[e33ddee] | 133 | </sect2>
|
---|
| 134 |
|
---|
[13b116c] | 135 | <sect2 role="kernel" id="NetworkManager-kernel">
|
---|
| 136 | <title>Kernel Configuration</title>
|
---|
| 137 |
|
---|
| 138 | <para>
|
---|
[fc88f1f] | 139 | If you wish to run the tests, check that at least the following options
|
---|
| 140 | are enabled in the kernel configuration. Those options have been
|
---|
| 141 | determined to be necessary, but may not be sufficient. Recompile the
|
---|
| 142 | kernel if necessary:
|
---|
[13b116c] | 143 | </para>
|
---|
| 144 |
|
---|
[8558044] | 145 | <!-- Ethernet Teaming support is potentially optional, but I didn't
|
---|
[13b116c] | 146 | run the tests again to test that. It was needed to convince one of
|
---|
| 147 | the Linux Platform tests to move farther along because otherwise
|
---|
| 148 | RTNETLINK would respond with an Error 95 - unknown device type.
|
---|
[fc88f1f] | 149 | This would cause the test to fail early on in the process.
|
---|
| 150 |
|
---|
| 151 | [pierre, Nov 2022]: I cannot tell whether these options are
|
---|
| 152 | the only ones that are needed. They are the options I had to add
|
---|
| 153 | in order to have some tests pass. But I already had some other
|
---|
| 154 | options set for packet filtering (iptables), that may not be
|
---|
| 155 | available by default and may be necessary. Even with the options
|
---|
| 156 | below still one test (test-route) fails.-->
|
---|
| 157 |
|
---|
[7ea158e] | 158 | <screen><literal>[*] Networking support---> [CONFIG_NET]
|
---|
[fc88f1f] | 159 | Networking options--->
|
---|
| 160 | [*] TCP/IP networking [CONFIG_INET]
|
---|
| 161 | <*/M> IP: tunelling [CONFIG_NET_IPIP]
|
---|
| 162 | <*/M> IP: GRE demultiplexer [CONFIG_NET_IPGRE_DEMUX]
|
---|
| 163 | <*/M> IP: GRE tunnels over IP [CONFIG_NET_IPGRE]
|
---|
| 164 | <*> The IPv6 protocol ---> [CONFIG_IPV6]
|
---|
| 165 | <*/M> IPv6: IPv6-in-IPv4 tunnel (SIT driver) [CONFIG_IPV6_SIT]
|
---|
| 166 | <*/M> IPv6: GRE tunnel [CONFIG_IPV6_GRE]
|
---|
| 167 | [*] IPv6: Multiple Routing Tables [CONFIG_IPV6_MULTIPLE_TABLES]
|
---|
| 168 | [*] MPTCP: Multipath TCP [CONFIG_MPTCP]
|
---|
| 169 | [*] MPTCP: IPv6 support for Multipath TCP [CONFIG_MPTCP_IPV6]
|
---|
| 170 | <*/M> 802.1Q/802.1ad VLAN Support [CONFIG_VLAN_8021Q]
|
---|
| 171 | [*] QoS and/or fair queueing ---> [CONFIG_NET_SCHED]
|
---|
| 172 | <*/M> Stochastic Fairness Queueing (SFQ) [CONFIG_NET_SCH_SFQ]
|
---|
| 173 | <*/M> Token Bucket Filter (TBF) [CONFIG_NET_SCH_TBF]
|
---|
| 174 | <*/M> Fair Queue Controlled Delay AQM (FQ_CODEL) [CONFIG_NET_SCH_FQ_CODEL]
|
---|
| 175 | <*/M> Ingress/classifier-action Qdisc [CONFIG_NET_SCH_INGRESS]
|
---|
| 176 | Device Drivers --->
|
---|
| 177 | [*] Network device support ---> [CONFIG_NETDEVICES]
|
---|
| 178 | [*] Network core driver support [CONFIG_NET_CORE]
|
---|
| 179 | <*> Bonding driver support [CONFIG_BONDING]
|
---|
| 180 | <*> Dummy net driver support [CONFIG_DUMMY]
|
---|
| 181 | <*> Ethernet team driver support ---> [CONFIG_NET_TEAM]
|
---|
| 182 | <*> MAC-VLAN support [CONFIG_MACVLAN]
|
---|
| 183 | <*> MAC-VLAN based tap driver [CONFIG_MACVTAP]
|
---|
| 184 | <*> IP-VLAN support [CONFIG_IPVLAN]
|
---|
| 185 | <*> Virtual eXtensible Local Area Network (VXLAN) [CONFIG_VXLAN]
|
---|
| 186 | <*> Virtual ethernet pair device [CONFIG_VETH]
|
---|
[7ea158e] | 187 | <*> Virtual Routing and Forwarding (Lite) [CONFIG_VRF]</literal></screen>
|
---|
[13b116c] | 188 |
|
---|
| 189 | <indexterm zone="NetworkManager NetworkManager-kernel">
|
---|
| 190 | <primary sortas="d-NetworkManager">NetworkManager</primary>
|
---|
| 191 | </indexterm>
|
---|
| 192 | </sect2>
|
---|
| 193 |
|
---|
[e33ddee] | 194 | <sect2 role="installation">
|
---|
| 195 | <title>Installation of NetworkManager</title>
|
---|
| 196 |
|
---|
[7c56ece] | 197 | <para>
|
---|
[8558044] | 198 | If <xref linkend="qt5"/> is installed and the Qt based
|
---|
[7c56ece] | 199 | examples are desired, fix two meson.build files:
|
---|
| 200 | </para>
|
---|
[e4d2b8d] | 201 |
|
---|
[e022b07] | 202 | <screen><userinput>sed -e 's/-qt4/-qt5/' \
|
---|
[e4d2b8d] | 203 | -e 's/moc_location/host_bins/' \
|
---|
[6573fc3] | 204 | -i examples/C/qt/meson.build &&
|
---|
[40d141f] | 205 |
|
---|
[6573fc3] | 206 | sed -e 's/Qt/&5/' \
|
---|
| 207 | -i meson.build</userinput></screen>
|
---|
[d267a13] | 208 |
|
---|
[f61c18e] | 209 | <!--
|
---|
[d267a13] | 210 | <para>
|
---|
| 211 | Fix a missing meson.build file for initrd hooks (not used in BLFS):
|
---|
| 212 | </para>
|
---|
| 213 |
|
---|
[4da49b9] | 214 | <screen><userinput>sed '/initrd/d' -i src/core/meson.build</userinput></screen>
|
---|
[f61c18e] | 215 | -->
|
---|
[e4d2b8d] | 216 |
|
---|
[fdbfe39] | 217 | <para>
|
---|
| 218 | Fix the python scripts so that they use <application>Python
|
---|
| 219 | 3</application>:
|
---|
| 220 | </para>
|
---|
| 221 |
|
---|
| 222 | <screen><userinput>grep -rl '^#!.*python$' | xargs sed -i '1s/python/&3/'</userinput></screen>
|
---|
| 223 |
|
---|
[7ded7e3] | 224 | <para>
|
---|
[7c4f32b] | 225 | Install <application>NetworkManager</application> by running the
|
---|
| 226 | following commands:
|
---|
[7ded7e3] | 227 | </para>
|
---|
[e33ddee] | 228 |
|
---|
[d267a13] | 229 | <screen revision="sysv"><userinput>mkdir build &&
|
---|
[7d07abd] | 230 | cd build &&
|
---|
[d267a13] | 231 |
|
---|
| 232 | CXXFLAGS+="-O2 -fPIC" \
|
---|
[4b6e2b2] | 233 | meson setup \
|
---|
| 234 | --prefix=/usr \
|
---|
[adf17153] | 235 | --buildtype=release \
|
---|
[d267a13] | 236 | -Dlibaudit=no \
|
---|
[39100371] | 237 | -Dlibpsl=false \
|
---|
| 238 | -Dnmtui=true \
|
---|
| 239 | -Dovs=false \
|
---|
| 240 | -Dppp=false \
|
---|
[d267a13] | 241 | -Dselinux=false \
|
---|
[51dfb3e] | 242 | -Dsession_tracking=elogind \
|
---|
[39100371] | 243 | -Dmodem_manager=false \
|
---|
[d267a13] | 244 | -Dsystemdsystemunitdir=no \
|
---|
| 245 | -Dsystemd_journal=false \
|
---|
| 246 | -Dqt=false \
|
---|
| 247 | .. &&
|
---|
| 248 | ninja</userinput></screen>
|
---|
| 249 |
|
---|
| 250 | <screen revision="systemd"><userinput>mkdir build &&
|
---|
[7d07abd] | 251 | cd build &&
|
---|
[d267a13] | 252 |
|
---|
| 253 | CXXFLAGS+="-O2 -fPIC" \
|
---|
[4b6e2b2] | 254 | meson setup \
|
---|
| 255 | --prefix=/usr \
|
---|
[adf17153] | 256 | --buildtype=release \
|
---|
[d267a13] | 257 | -Dlibaudit=no \
|
---|
[39100371] | 258 | -Dlibpsl=false \
|
---|
| 259 | -Dnmtui=true \
|
---|
| 260 | -Dovs=false \
|
---|
| 261 | -Dppp=false \
|
---|
[d267a13] | 262 | -Dselinux=false \
|
---|
| 263 | -Dqt=false \
|
---|
| 264 | -Dsession_tracking=systemd \
|
---|
[39100371] | 265 | -Dmodem_manager=false \
|
---|
[d267a13] | 266 | .. &&
|
---|
| 267 | ninja</userinput></screen>
|
---|
[cec6657e] | 268 |
|
---|
[7ded7e3] | 269 | <para>
|
---|
[0bfaca0] | 270 | An already active graphical session with a bus address is necessary
|
---|
| 271 | to run the tests. To test the results, issue
|
---|
| 272 | <command>ninja test</command>.
|
---|
[fc88f1f] | 273 | </para>
|
---|
| 274 |
|
---|
| 275 | <para>
|
---|
| 276 | A few tests may fail, depending on enabled kernel options.
|
---|
[7ded7e3] | 277 | </para>
|
---|
[e33ddee] | 278 |
|
---|
[7ded7e3] | 279 | <para>
|
---|
| 280 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 281 | </para>
|
---|
[e33ddee] | 282 |
|
---|
[d267a13] | 283 | <screen role="root"><userinput>ninja install &&
|
---|
| 284 | mv -v /usr/share/doc/NetworkManager{,-&NetworkManager-version;}</userinput></screen>
|
---|
[e33ddee] | 285 |
|
---|
[4d6a0e2] | 286 | <para>
|
---|
| 287 | If you have not passed the <option>-Ddocs=true</option> option to
|
---|
| 288 | <command>meson</command>, you can install the pregenerated manual pages
|
---|
| 289 | with (as the &root; user):
|
---|
| 290 | </para>
|
---|
| 291 |
|
---|
| 292 | <screen role="root"><userinput>for file in $(echo ../man/*.[1578]); do
|
---|
| 293 | section=${file##*.} &&
|
---|
| 294 | install -vdm 755 /usr/share/man/man$section
|
---|
| 295 | install -vm 644 $file /usr/share/man/man$section/
|
---|
| 296 | done</userinput></screen>
|
---|
| 297 |
|
---|
| 298 | <para>
|
---|
| 299 | Still in case you have not used <option>-Ddocs=true</option>, the
|
---|
| 300 | pregenerated HTML documentation can also be installed with (as
|
---|
| 301 | the &root; user):
|
---|
| 302 | </para>
|
---|
| 303 |
|
---|
| 304 | <screen role="root"
|
---|
| 305 | remap="doc"><userinput>cp -Rv ../docs/{api,libnm} /usr/share/doc/NetworkManager-&NetworkManager-version;</userinput></screen>
|
---|
| 306 |
|
---|
[e33ddee] | 307 | </sect2>
|
---|
| 308 |
|
---|
| 309 | <sect2 role="commands">
|
---|
| 310 | <title>Command Explanations</title>
|
---|
| 311 |
|
---|
[e4d2b8d] | 312 | <para>
|
---|
[8558044] | 313 | <envar>CXXFLAGS="-O2 -fPIC"</envar>: These compiler options are
|
---|
[e4d2b8d] | 314 | necessary to build the Qt5 based examples.
|
---|
| 315 | </para>
|
---|
| 316 |
|
---|
[adf17153] | 317 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 318 | href="../../xincludes/meson-buildtype-release.xml"/>
|
---|
| 319 |
|
---|
[e64cabd] | 320 | <para>
|
---|
[fdbfe39] | 321 | <option>-Ddocs=true</option>: Use this switch to enable building
|
---|
[39100371] | 322 | man pages and documentation if <xref linkend="gtk-doc"/> is installed.
|
---|
[e64cabd] | 323 | </para>
|
---|
| 324 |
|
---|
[7ded7e3] | 325 | <para>
|
---|
[d267a13] | 326 | <parameter>-Dnmtui=true</parameter>: This parameter enables building
|
---|
[acb3e9f] | 327 | <command>nmtui</command>.
|
---|
| 328 | </para>
|
---|
| 329 |
|
---|
[d267a13] | 330 | <para revision="sysv">
|
---|
[51dfb3e] | 331 | <parameter>-Dsystemdsystemunitdir=no</parameter> and
|
---|
[d267a13] | 332 | <parameter>-Dsystemd_journal=false</parameter>: systemd is not
|
---|
| 333 | used for sysv init systems.
|
---|
| 334 | </para>
|
---|
| 335 |
|
---|
[39100371] | 336 | <para>
|
---|
[21d18f7e] | 337 | <parameter>-Dlibpsl=false</parameter> and
|
---|
[e130fead] | 338 | <parameter>-Dovs=false</parameter>: These switches disable building with the
|
---|
[39100371] | 339 | respective libraries. Remove if you have the needed libraries installed.
|
---|
| 340 | </para>
|
---|
[8558044] | 341 |
|
---|
[52c95143] | 342 | <!--
|
---|
[39100371] | 343 | <para>
|
---|
[f759a25] | 344 | <parameter>-Dlibpsl=false</parameter>: This switch is required if
|
---|
| 345 | <application>libpsl</application> is not installed. Omit this switch if
|
---|
| 346 | you have built <application>libpsl</application>.
|
---|
| 347 | </para>
|
---|
[52c95143] | 348 | -->
|
---|
[f759a25] | 349 |
|
---|
| 350 | <para>
|
---|
[2c87187] | 351 | <parameter>-Dmodem_manager=false</parameter>: This switch is required if
|
---|
[39100371] | 352 | <application>ModemManager</application> is not installed. Omit if you
|
---|
[a406810] | 353 | have built <application>ModemManager</application> and
|
---|
| 354 | <application>mobile-broadband-provider-info</application>.
|
---|
[39100371] | 355 | </para>
|
---|
| 356 |
|
---|
[51dfb3e] | 357 | <para revision="sysv">
|
---|
| 358 | <parameter>-Dsession_tracking=elogind</parameter>: This switch
|
---|
| 359 | is used to set <command>elogind</command> as the default
|
---|
| 360 | program for session tracking.
|
---|
| 361 | </para>
|
---|
| 362 |
|
---|
[cec6657e] | 363 | <para revision="systemd">
|
---|
[d267a13] | 364 | <parameter>-Dsession_tracking=systemd</parameter>: This switch
|
---|
[cec6657e] | 365 | is used to set <command>systemd-logind</command> as the default
|
---|
| 366 | program for session tracking.
|
---|
| 367 | </para>
|
---|
| 368 |
|
---|
| 369 | <para revision="systemd">
|
---|
[d267a13] | 370 | <parameter>-Dsystemdsystemunitdir=/lib/systemd/system</parameter>:
|
---|
[cec6657e] | 371 | This switch is used to set the correct installation directory for
|
---|
| 372 | systemd units.
|
---|
| 373 | </para>
|
---|
| 374 |
|
---|
[acb3e9f] | 375 | <para>
|
---|
[d267a13] | 376 | <parameter>-Dppp=false</parameter>: This parameter disables
|
---|
[6e1616e2] | 377 | <application>PPP</application> support in
|
---|
| 378 | <application>NetworkManager</application>.
|
---|
[7ded7e3] | 379 | </para>
|
---|
[e33ddee] | 380 |
|
---|
[8c7390c] | 381 | <para>
|
---|
[d267a13] | 382 | <parameter>-Dlibaudit=no</parameter> and
|
---|
| 383 | <parameter>-Dselinux=false</parameter>: libaudit and SELinux are not used
|
---|
| 384 | in BLFS.
|
---|
[d6e164b] | 385 | </para>
|
---|
[e33ddee] | 386 |
|
---|
[b528d0f4] | 387 | <para>
|
---|
[d267a13] | 388 | <parameter>-Dqt=false</parameter>: disables the
|
---|
| 389 | <application>QT</application> examples. Omit if you have
|
---|
| 390 | <application>QT</application> available and wish to install the examples.
|
---|
[b528d0f4] | 391 | </para>
|
---|
| 392 |
|
---|
[e33ddee] | 393 | </sect2>
|
---|
| 394 |
|
---|
[d497e89] | 395 | <sect2 role="configuration">
|
---|
| 396 | <title>Configuring NetworkManager</title>
|
---|
| 397 |
|
---|
| 398 | <sect3 id="NetworkManager-config">
|
---|
| 399 | <title>Config Files</title>
|
---|
| 400 | <para>
|
---|
| 401 | <filename>/etc/NetworkManager/NetworkManager.conf</filename>
|
---|
| 402 | </para>
|
---|
| 403 |
|
---|
| 404 | <indexterm zone="NetworkManager NetworkManager-config">
|
---|
| 405 | <primary
|
---|
| 406 | sortas="e-etc-NetworkManager-NetworkManager.conf">
|
---|
| 407 | /etc/NetworkManager/NetworkManager.conf</primary>
|
---|
| 408 | </indexterm>
|
---|
| 409 |
|
---|
| 410 | </sect3>
|
---|
| 411 |
|
---|
| 412 | <sect3><title>Configuration Information</title>
|
---|
| 413 |
|
---|
| 414 | <para>
|
---|
| 415 | For <application>NetworkManager</application> to work, at least
|
---|
[21d18f7e] | 416 | a minimal configuration file must be present. Such a file is not
|
---|
[8df33ae3] | 417 | installed with <command>make install</command>. Issue the following
|
---|
| 418 | command as the <systemitem class="username">root</systemitem> user to
|
---|
[21d18f7e] | 419 | create a minimal <filename>NetworkManager.conf</filename> file:
|
---|
[d497e89] | 420 | </para>
|
---|
| 421 |
|
---|
| 422 | <screen role="root"><userinput>cat >> /etc/NetworkManager/NetworkManager.conf << "EOF"
|
---|
| 423 | <literal>[main]
|
---|
| 424 | plugins=keyfile</literal>
|
---|
| 425 | EOF</userinput></screen>
|
---|
| 426 |
|
---|
| 427 | <para>
|
---|
[7fd06b0] | 428 | This file should not be modified directly by users of the system.
|
---|
| 429 | Instead, system specific changes should be made using configuration
|
---|
| 430 | files in the
|
---|
| 431 | <filename class="directory">/etc/NetworkManager/conf.d</filename>
|
---|
[21d18f7e] | 432 | directory.
|
---|
[7fd06b0] | 433 | </para>
|
---|
| 434 |
|
---|
| 435 | <para>
|
---|
| 436 | To allow polkit to manage authorizations, add the following
|
---|
| 437 | configuration file:
|
---|
| 438 | </para>
|
---|
| 439 |
|
---|
| 440 | <screen role="root"><userinput>cat > /etc/NetworkManager/conf.d/polkit.conf << "EOF"
|
---|
| 441 | <literal>[main]
|
---|
| 442 | auth-polkit=true</literal>
|
---|
| 443 | EOF</userinput></screen>
|
---|
| 444 |
|
---|
| 445 | <para>
|
---|
| 446 | To use something other than the built-in dhcp client (recommended if
|
---|
| 447 | using only <command>nmcli</command>), use the following configuration
|
---|
[24627ba] | 448 | (valid values include either dhclient <!--dhcpcd --> or internal):
|
---|
[7fd06b0] | 449 | </para>
|
---|
| 450 |
|
---|
| 451 | <screen role="nodump"><userinput>cat > /etc/NetworkManager/conf.d/dhcp.conf << "EOF"
|
---|
| 452 | <literal>[main]
|
---|
| 453 | dhcp=</literal><replaceable>dhclient</replaceable>
|
---|
| 454 | EOF</userinput></screen>
|
---|
| 455 |
|
---|
| 456 | <para>
|
---|
| 457 | To prevent <application>NetworkManager</application> from updating the
|
---|
| 458 | <filename>/etc/resolv.conf</filename> file, add the following
|
---|
| 459 | configuration file:
|
---|
| 460 | </para>
|
---|
| 461 |
|
---|
| 462 | <screen role="nodump"><userinput>cat > /etc/NetworkManager/conf.d/no-dns-update.conf << "EOF"
|
---|
| 463 | <literal>[main]
|
---|
| 464 | dns=none</literal>
|
---|
| 465 | EOF</userinput></screen>
|
---|
| 466 |
|
---|
| 467 | <para>
|
---|
[5f729f8] | 468 | For additional configuration options, see
|
---|
[7fd06b0] | 469 | <command>man 5 NetworkManager.conf</command>.
|
---|
[0d7900a] | 470 | </para>
|
---|
[d497e89] | 471 |
|
---|
[8df33ae3] | 472 | <para>
|
---|
[21d18f7e] | 473 | To allow regular users to configure network connections,
|
---|
[8df33ae3] | 474 | you should add them to the
|
---|
| 475 | <systemitem class="groupname">netdev</systemitem>
|
---|
| 476 | group, and create a <application>polkit</application> rule that grants
|
---|
| 477 | access. Run the following commands as the
|
---|
| 478 | <systemitem class="username">root</systemitem> user:
|
---|
| 479 | </para>
|
---|
| 480 |
|
---|
[a581662] | 481 | <screen role="root"><userinput>groupadd -fg 86 netdev &&
|
---|
[b88584a] | 482 | /usr/sbin/usermod -a -G netdev <replaceable><username></replaceable>
|
---|
[8df33ae3] | 483 |
|
---|
| 484 | cat > /usr/share/polkit-1/rules.d/org.freedesktop.NetworkManager.rules << "EOF"
|
---|
| 485 | <literal>polkit.addRule(function(action, subject) {
|
---|
| 486 | if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 && subject.isInGroup("netdev")) {
|
---|
| 487 | return polkit.Result.YES;
|
---|
| 488 | }
|
---|
| 489 | });</literal>
|
---|
| 490 | EOF</userinput></screen>
|
---|
| 491 |
|
---|
[d497e89] | 492 | </sect3>
|
---|
| 493 |
|
---|
| 494 | <sect3 id="NetworkManager-init">
|
---|
[cec6657e] | 495 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 496 | <phrase revision="systemd">Systemd Unit</phrase></title>
|
---|
| 497 |
|
---|
| 498 | <para revision="sysv">
|
---|
| 499 | To automatically start the <command>NetworkManager</command> daemon
|
---|
| 500 | when the system is rebooted, install the
|
---|
[8558044] | 501 | <filename>/etc/rc.d/init.d/networkmanager</filename>bootscript from the
|
---|
[cec6657e] | 502 | <xref linkend="bootscripts"/> package.
|
---|
| 503 | </para>
|
---|
[d497e89] | 504 |
|
---|
[cec6657e] | 505 | <para revision="systemd">
|
---|
| 506 | To start the <command>NetworkManager</command> daemon at boot, enable
|
---|
| 507 | the previously installed systemd unit by running the following command
|
---|
| 508 | as the <systemitem class="username">root</systemitem> user:
|
---|
[d497e89] | 509 | </para>
|
---|
| 510 |
|
---|
[8df33ae3] | 511 | <note>
|
---|
| 512 | <para>
|
---|
| 513 | If using <application>Network Manager</application> to manage
|
---|
| 514 | an interface, any previous configuration for that interface should be
|
---|
| 515 | removed, and the interface brought down prior to starting
|
---|
| 516 | <application>Network Manager</application>.
|
---|
| 517 | </para>
|
---|
| 518 | </note>
|
---|
[8558044] | 519 |
|
---|
[d497e89] | 520 | <indexterm zone="NetworkManager NetworkManager-init">
|
---|
| 521 | <primary sortas="f-NetworkManager">NetworkManager</primary>
|
---|
| 522 | </indexterm>
|
---|
| 523 |
|
---|
[cec6657e] | 524 | <screen role="root" revision="sysv"><userinput>make install-networkmanager</userinput></screen>
|
---|
| 525 |
|
---|
| 526 | <screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager</userinput></screen>
|
---|
[e2a1442] | 527 | <!-- The below instruction is obsolete. NetworkManager-wait-online is now
|
---|
| 528 | enabled by default when enabling NetworkManager. -->
|
---|
| 529 | <!--
|
---|
[cec6657e] | 530 | <para revision="systemd">
|
---|
| 531 | <application>NetworkManager</application> also ships a systemd unit
|
---|
| 532 | called <filename>NetworkManager-wait-online.service</filename> which
|
---|
| 533 | can be used to prevent services that require network connectivity
|
---|
| 534 | from starting until <application>NetworkManager</application> has
|
---|
| 535 | established the connection. To enable it, run the following command
|
---|
| 536 | as the <systemitem class="username">root</systemitem> user:
|
---|
| 537 | </para>
|
---|
| 538 |
|
---|
| 539 | <screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager-wait-online</userinput></screen>
|
---|
[e2a1442] | 540 | -->
|
---|
| 541 | <!-- As such, let's now provide instructions on how to disable that
|
---|
| 542 | behavior, for those who wish to do so. -->
|
---|
| 543 | <para revision="systemd">
|
---|
| 544 | Starting in version 1.11.2 of <application>NetworkManager</application>,
|
---|
| 545 | a systemd unit named <filename>NetworkManager-wait-online.service</filename>
|
---|
| 546 | is enabled, which is used to prevent services that require network
|
---|
| 547 | connectivity from starting until <application>NetworkManager</application>
|
---|
| 548 | establishes a connection. To disable this behavior, run the following
|
---|
| 549 | command as the <systemitem class="username">root</systemitem> user:
|
---|
| 550 | </para>
|
---|
| 551 |
|
---|
| 552 | <screen role="root" revision="systemd"><userinput>systemctl disable NetworkManager-wait-online</userinput></screen>
|
---|
[2cd1071] | 553 |
|
---|
[d497e89] | 554 | </sect3>
|
---|
| 555 |
|
---|
| 556 | </sect2>
|
---|
| 557 |
|
---|
[e33ddee] | 558 | <sect2 role="content">
|
---|
| 559 | <title>Contents</title>
|
---|
| 560 |
|
---|
| 561 | <segmentedlist>
|
---|
| 562 | <segtitle>Installed Programs</segtitle>
|
---|
| 563 | <segtitle>Installed Libraries</segtitle>
|
---|
| 564 | <segtitle>Installed Directories</segtitle>
|
---|
| 565 |
|
---|
| 566 | <seglistitem>
|
---|
[d497e89] | 567 | <seg>
|
---|
[8c7390c] | 568 | NetworkManager, nmcli, nm-online, nmtui, and, symlinked to nmtui:
|
---|
| 569 | nmtui-connect, nmtui-edit, and nmtui-hostname
|
---|
[d497e89] | 570 | </seg>
|
---|
| 571 | <seg>
|
---|
[b9f17a8] | 572 | libnm.so
|
---|
[52c95143] | 573 | and several modules under /usr/lib/NetworkManager
|
---|
[d497e89] | 574 | </seg>
|
---|
| 575 | <seg>
|
---|
[5aa7dce] | 576 | /etc/NetworkManager,
|
---|
[05a433b] | 577 | /usr/include/libnm,
|
---|
[5aa7dce] | 578 | /usr/lib/NetworkManager,
|
---|
| 579 | /usr/share/doc/NetworkManager-&NetworkManager-version;,
|
---|
[b9f17a8] | 580 | /usr/share/gtk-doc/html/{libnm,NetworkManager}
|
---|
| 581 | (if the documentation is built),
|
---|
[5aa7dce] | 582 | and
|
---|
[262a108] | 583 | /var/lib/NetworkManager
|
---|
[d497e89] | 584 | </seg>
|
---|
[e33ddee] | 585 | </seglistitem>
|
---|
| 586 | </segmentedlist>
|
---|
| 587 |
|
---|
| 588 | <variablelist>
|
---|
| 589 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 590 | <?dbfo list-presentation="list"?>
|
---|
| 591 | <?dbhtml list-presentation="table"?>
|
---|
| 592 |
|
---|
[d497e89] | 593 | <varlistentry id="nmcli">
|
---|
| 594 | <term><command>nmcli</command></term>
|
---|
[e33ddee] | 595 | <listitem>
|
---|
[7ded7e3] | 596 | <para>
|
---|
| 597 | is a command-line tool for controlling
|
---|
[0d7900a] | 598 | <application>NetworkManager</application>
|
---|
[4c24eb0a] | 599 | and getting its status
|
---|
[7ded7e3] | 600 | </para>
|
---|
[d497e89] | 601 | <indexterm zone="NetworkManager nmcli">
|
---|
| 602 | <primary sortas="b-nmcli">nmcli</primary>
|
---|
[e33ddee] | 603 | </indexterm>
|
---|
| 604 | </listitem>
|
---|
| 605 | </varlistentry>
|
---|
| 606 |
|
---|
| 607 | <varlistentry id="nm-online">
|
---|
| 608 | <term><command>nm-online</command></term>
|
---|
| 609 | <listitem>
|
---|
[7ded7e3] | 610 | <para>
|
---|
[4c24eb0a] | 611 | is an utility to determine whether you are online
|
---|
[7ded7e3] | 612 | </para>
|
---|
[e33ddee] | 613 | <indexterm zone="NetworkManager nm-online">
|
---|
| 614 | <primary sortas="b-nm-online">nm-online</primary>
|
---|
| 615 | </indexterm>
|
---|
| 616 | </listitem>
|
---|
| 617 | </varlistentry>
|
---|
| 618 |
|
---|
[acb3e9f] | 619 | <varlistentry id="nmtui">
|
---|
| 620 | <term><command>nmtui</command></term>
|
---|
| 621 | <listitem>
|
---|
| 622 | <para>
|
---|
[21d18f7e] | 623 | is an interactive ncurses-based user interface for
|
---|
[4c24eb0a] | 624 | <application>nmcli</application>
|
---|
[acb3e9f] | 625 | </para>
|
---|
| 626 | <indexterm zone="NetworkManager nmtui">
|
---|
| 627 | <primary sortas="b-nmtui">nmtui</primary>
|
---|
| 628 | </indexterm>
|
---|
| 629 | </listitem>
|
---|
| 630 | </varlistentry>
|
---|
| 631 |
|
---|
| 632 | <varlistentry id="nmtui-connect">
|
---|
| 633 | <term><command>nmtui-connect</command></term>
|
---|
| 634 | <listitem>
|
---|
| 635 | <para>
|
---|
[21d18f7e] | 636 | is an interactive ncurses-based user interface to
|
---|
[4c24eb0a] | 637 | activate/deactivate connections
|
---|
[acb3e9f] | 638 | </para>
|
---|
| 639 | <indexterm zone="NetworkManager nmtui-connect">
|
---|
| 640 | <primary sortas="b-nmtui-connect">nmtui-connect</primary>
|
---|
| 641 | </indexterm>
|
---|
| 642 | </listitem>
|
---|
| 643 | </varlistentry>
|
---|
| 644 |
|
---|
| 645 | <varlistentry id="nmtui-edit">
|
---|
| 646 | <term><command>nmtui-edit</command></term>
|
---|
| 647 | <listitem>
|
---|
| 648 | <para>
|
---|
[4c24eb0a] | 649 | is an interactive ncurses-based user interface to edit connections
|
---|
[acb3e9f] | 650 | </para>
|
---|
| 651 | <indexterm zone="NetworkManager nmtui-edit">
|
---|
| 652 | <primary sortas="b-nmtui-edit">nmtui-edit</primary>
|
---|
| 653 | </indexterm>
|
---|
| 654 | </listitem>
|
---|
| 655 | </varlistentry>
|
---|
| 656 |
|
---|
| 657 | <varlistentry id="nmtui-hostname">
|
---|
| 658 | <term><command>nmtui-hostname</command></term>
|
---|
[e33ddee] | 659 | <listitem>
|
---|
[7ded7e3] | 660 | <para>
|
---|
[4c24eb0a] | 661 | is an interactive ncurses-based user interface to edit the hostname
|
---|
[7ded7e3] | 662 | </para>
|
---|
[acb3e9f] | 663 | <indexterm zone="NetworkManager nmtui-hostname">
|
---|
| 664 | <primary sortas="b-nmtui-hostname">nmtui-hostname</primary>
|
---|
[e33ddee] | 665 | </indexterm>
|
---|
| 666 | </listitem>
|
---|
| 667 | </varlistentry>
|
---|
| 668 |
|
---|
[d497e89] | 669 | <varlistentry id="NetworkManager-prog">
|
---|
| 670 | <term><command>NetworkManager</command></term>
|
---|
[e33ddee] | 671 | <listitem>
|
---|
[7ded7e3] | 672 | <para>
|
---|
[4c24eb0a] | 673 | is the network management daemon
|
---|
[7ded7e3] | 674 | </para>
|
---|
[d497e89] | 675 | <indexterm zone="NetworkManager NetworkManager-prog">
|
---|
[7ded7e3] | 676 | <primary sortas="b-NetworkManager">NetworkManager</primary>
|
---|
[e33ddee] | 677 | </indexterm>
|
---|
| 678 | </listitem>
|
---|
| 679 | </varlistentry>
|
---|
| 680 |
|
---|
[262a108] | 681 | <varlistentry id="libnm">
|
---|
| 682 | <term><filename class="libraryfile">libnm.so</filename></term>
|
---|
[e33ddee] | 683 | <listitem>
|
---|
[7ded7e3] | 684 | <para>
|
---|
[4c24eb0a] | 685 | contains functions used by <application>NetworkManager</application>
|
---|
[7ded7e3] | 686 | </para>
|
---|
[262a108] | 687 | <indexterm zone="NetworkManager libnm">
|
---|
| 688 | <primary sortas="c-libnm">libnm.so</primary>
|
---|
[e33ddee] | 689 | </indexterm>
|
---|
| 690 | </listitem>
|
---|
| 691 | </varlistentry>
|
---|
| 692 | </variablelist>
|
---|
| 693 |
|
---|
| 694 | </sect2>
|
---|
| 695 |
|
---|
| 696 | </sect1>
|
---|