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