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