]> git.proxmox.com Git - mirror_frr.git/blame - doc/user/installation.rst
doc: spelling fixes
[mirror_frr.git] / doc / user / installation.rst
CommitLineData
0efdf0fe 1.. _installation:
42fc5d26
QY
2
3************
4Installation
5************
6
7.. index:: How to install FRR
42fc5d26 8.. index:: Installation
42fc5d26 9.. index:: Installing FRR
42fc5d26 10.. index:: Building the system
42fc5d26
QY
11.. index:: Making FRR
12
44f2550e 13Several distributions provide packages for FRR. Check your distribution's
d1e7591e 14repositories to find out if a suitable version is available.
44f2550e 15
07a17e6d 16FRR depends on various libraries depending on your operating system.
44f2550e 17
07a17e6d
QY
18After installing these dependencies, change to the frr source directory and
19issue the following commands:
42fc5d26
QY
20
21::
22
07a17e6d
QY
23 $ ./bootstrap.sh
24 $ ./configure
25 $ make
26 $ make install
44f2550e 27
42fc5d26 28
0efdf0fe 29.. _configure-the-software:
42fc5d26
QY
30
31Configure the Software
32======================
33
34
0efdf0fe 35.. _the-configure-script:
42fc5d26 36
dc5564c7
QY
37The Configure Script
38--------------------
42fc5d26
QY
39
40.. index:: Configuration options
41
42.. index:: Options for configuring
43
44.. index:: Build options
45
46.. index:: Distribution configuration
47
48.. index:: Options to `./configure`
49
50FRR has an excellent configure script which automatically detects most
51host configurations. There are several additional configure options to
52customize the build to include or exclude specific features and dependencies.
53
dc5564c7 54.. program:: configure
42fc5d26 55
dc5564c7 56.. option:: --disable-zebra
42fc5d26 57
dc5564c7 58 Do not build zebra daemon.
42fc5d26 59
dc5564c7 60.. option:: --disable-ripd
42fc5d26 61
dc5564c7 62 Do not build ripd.
42fc5d26 63
dc5564c7 64.. option:: --disable-ripngd
42fc5d26 65
dc5564c7 66 Do not build ripngd.
42fc5d26 67
dc5564c7 68.. option:: --disable-ospfd
42fc5d26 69
dc5564c7 70 Do not build ospfd.
42fc5d26 71
dc5564c7 72.. option:: --disable-ospf6d
42fc5d26 73
dc5564c7 74 Do not build ospf6d.
42fc5d26 75
dc5564c7 76.. option:: --disable-bgpd
42fc5d26 77
dc5564c7 78 Do not build bgpd.
42fc5d26 79
dc5564c7 80.. option:: --disable-bgp-announce
42fc5d26 81
dc5564c7
QY
82 Make *bgpd* which does not make bgp announcements at all. This
83 feature is good for using *bgpd* as a BGP announcement listener.
42fc5d26 84
dc5564c7 85.. option:: --enable-datacenter
42fc5d26 86
dc5564c7
QY
87 Enable system defaults to work as if in a Data Center. See defaults.h
88 for what is changed by this configure option.
42fc5d26 89
dc5564c7 90.. option:: --enable-snmp
42fc5d26 91
dc5564c7 92 Enable SNMP support. By default, SNMP support is disabled.
42fc5d26 93
dc5564c7 94.. option:: --disable-ospfapi
42fc5d26 95
dc5564c7
QY
96 Disable support for OSPF-API, an API to interface directly with ospfd.
97 OSPF-API is enabled if --enable-opaque-lsa is set.
98
99.. option:: --disable-ospfclient
100
101 Disable building of the example OSPF-API client.
102
103.. option:: --disable-ospf-ri
104
105 Disable support for OSPF Router Information (RFC4970 & RFC5088) this
106 requires support for Opaque LSAs and Traffic Engineering.
107
108.. option:: --disable-isisd
109
110 Do not build isisd.
111
112.. option:: --enable-isis-topology
113
114 Enable IS-IS topology generator.
115
116.. option:: --enable-isis-te
117
118 Enable Traffic Engineering Extension for ISIS (RFC5305)
119
d1a242fd 120.. option:: --enable-multipath <ARG>
dc5564c7
QY
121
122 Enable support for Equal Cost Multipath. `ARG` is the maximum number
123 of ECMP paths to allow, set to 0 to allow unlimited number of paths.
124
a5a48dbf
QY
125.. option:: --enable-realms
126
127 Enable the support of Linux Realms. Convert tag values from 1-255 into a
128 realm value when inserting into the Linux kernel. Then routing policy can be
129 assigned to the realm. See the tc man page.
130
dc5564c7
QY
131.. option:: --disable-rtadv
132
133 Disable support IPV6 router advertisement in zebra.
134
135.. option:: --enable-gcc-rdynamic
136
d1a242fd 137 Pass the ``-rdynamic`` option to the linker driver. This is in most cases
d1e7591e 138 necessary for getting usable backtraces. This option defaults to on if the
d1a242fd 139 compiler is detected as gcc, but giving an explicit enable/disable is
dc5564c7
QY
140 suggested.
141
142.. option:: --disable-backtrace
143
144 Controls backtrace support for the crash handlers. This is autodetected by
145 default. Using the switch will enforce the requested behaviour, failing with
146 an error if support is requested but not available. On BSD systems, this
147 needs libexecinfo, while on glibc support for this is part of libc itself.
148
149.. option:: --enable-dev-build
150
151 Turn on some options for compiling FRR within a development environment in
152 mind. Specifically turn on -g3 -O0 for compiling options and add inclusion
153 of grammar sandbox.
154
155.. option:: --enable-fuzzing
156
157 Turn on some compile options to allow you to run fuzzing tools against the
158 system. This flag is intended as a developer only tool and should not be
159 used for normal operations.
160
161.. option:: --disable-snmp
162
163 Build without SNMP support.
42fc5d26 164
c1a54c05
QY
165.. option:: --disable-vtysh
166
167 Build without VTYSH.
42fc5d26 168
013f9762
QY
169.. option:: --enable-fpm
170
171 Build with FPM module support.
172
1f35b46a
QY
173.. option:: --enable-numeric-version
174
175 Alpine Linux does not allow non-numeric characters in the version string.
d1e7591e 176 With this option, we provide a way to strip out these characters for APK dev
1f35b46a
QY
177 package builds.
178
42fc5d26 179You may specify any combination of the above options to the configure
dc5564c7 180script. By default, the executables are placed in :file:`/usr/local/sbin`
42fc5d26 181and the configuration files in :file:`/usr/local/etc`. The :file:`/usr/local/`
44f2550e 182installation prefix and other directories may be changed using the following
42fc5d26
QY
183options to the configuration script.
184
d1a242fd 185.. option:: --prefix <prefix>
42fc5d26 186
dc5564c7 187 Install architecture-independent files in `prefix` [/usr/local].
42fc5d26 188
d1a242fd 189.. option:: --sysconfdir <dir>
42fc5d26 190
dc5564c7
QY
191 Look for configuration files in `dir` [`prefix`/etc]. Note that sample
192 configuration files will be installed here.
44f2550e 193
d1a242fd 194.. option:: --localstatedir <dir>
42fc5d26 195
d1a242fd
QY
196 Configure zebra to use `dir` for local state files, such as pid files and
197 unix sockets.
42fc5d26 198
11ab5329 199.. _least-privilege-support:
42fc5d26 200
d1a242fd 201Least-Privilege Support
42fc5d26
QY
202-----------------------
203
204.. index:: FRR Least-Privileges
205
206.. index:: FRR Privileges
207
208Additionally, you may configure zebra to drop its elevated privileges
209shortly after startup and switch to another user. The configure script will
210automatically try to configure this support. There are three configure
211options to control the behaviour of FRR daemons.
212
d1a242fd 213.. option:: --enable-user <user>
42fc5d26 214
d1a242fd
QY
215 Switch to user `user shortly after startup, and run as user `user` in normal
216 operation.
42fc5d26 217
d1a242fd 218.. option:: --enable-group <user>
42fc5d26 219
d1a242fd 220 Switch real and effective group to `group` shortly after startup.
42fc5d26 221
d1a242fd 222.. option:: --enable-vty-group <group>
dc5564c7 223
d1e7591e
QY
224 Create Unix Vty sockets (for use with vtysh) with group ownership set to
225 `group`. This allows one to create a separate group which is restricted to
d1a242fd
QY
226 accessing only the vty sockets, hence allowing one to delegate this group to
227 individual users, or to run vtysh setgid to this group.
42fc5d26 228
07a17e6d
QY
229The default user and group which will be configured is 'frr' if no user or
230group is specified. Note that this user or group requires write access to the
231local state directory (see :option:`--localstatedir`) and requires at least
232read access, and write access if you wish to allow daemons to write out their
233configuration, to the configuration directory (see :option:`--sysconfdir`).
42fc5d26 234
dc5564c7
QY
235On systems which have the 'libcap' capabilities manipulation library (currently
236only Linux), FRR will retain only minimal capabilities required and will only
237raise these capabilities for brief periods. On systems without libcap, FRR will
238run as the user specified and only raise its UID to 0 for brief periods.
42fc5d26 239
0efdf0fe 240.. _linux-notes:
42fc5d26
QY
241
242Linux Notes
243-----------
244
245.. index:: Configuring FRR
246
247.. index:: Building on Linux boxes
248
249.. index:: Linux configurations
250
8fa64b2a
QY
251There are several options available only to GNU/Linux systems [#]_.
252If you use GNU/Linux, make sure that the current kernel configuration is what
253you want. FRR will run with any kernel configuration but some recommendations
254do exist.
42fc5d26
QY
255
256
07a17e6d 257- :makevar:`CONFIG_NETLINK`
d1e7591e 258 Kernel/User Netlink socket. This is a brand new feature which enables an
0efdf0fe 259 advanced interface between the Linux kernel and zebra (:ref:`kernel-interface`).
07a17e6d 260- :makevar:`CONFIG_RTNETLINK`
42fc5d26 261 Routing messages.
d1e7591e 262 This makes it possible to receive Netlink routing messages. If you
42fc5d26 263 specify this option, *zebra* can detect routing information
0efdf0fe 264 updates directly from the kernel (:ref:`kernel-interface`).
07a17e6d 265- :makevar:`CONFIG_IP_MULTICAST`
44f2550e 266 IP: multicasting.
0efdf0fe
QY
267 This option should be specified when you use *ripd* (:ref:`rip`) or
268 *ospfd* (:ref:`ospfv2`) because these protocols use multicast.
42fc5d26 269
42fc5d26
QY
270IPv6 support has been added in GNU/Linux kernel version 2.2. If you
271try to use the FRR IPv6 feature on a GNU/Linux kernel, please
272make sure the following libraries have been installed. Please note that
273these libraries will not be needed when you uses GNU C library 2.1
274or upper.
275
d1a242fd
QY
276- inet6-apps
277
42fc5d26
QY
278 The `inet6-apps` package includes basic IPv6 related libraries such
279 as `inet_ntop` and `inet_pton`. Some basic IPv6 programs such
280 as *ping*, *ftp*, and *inetd* are also
281 included. The `inet-apps` can be found at
282 `ftp://ftp.inner.net/pub/ipv6/ <ftp://ftp.inner.net/pub/ipv6/>`_.
283
d1a242fd
QY
284- net-tools
285
07a17e6d
QY
286 The `net-tools` package provides an IPv6 enabled interface and routing
287 utility. It contains *ifconfig*, *route*, *netstat*, and other tools.
288 `net-tools` may be found at http://www.tazenda.demon.co.uk/phil/net-tools/.
42fc5d26 289
0efdf0fe 290.. _build-the-software:
42fc5d26
QY
291
292Build the Software
293==================
294
dc5564c7
QY
295After configuring the software, you will need to compile it for your system.
296Simply issue the command *make* in the root of the source directory and the
297software will be compiled. Cliff Notes versions of different compilation
298examples can be found in the Developer's Manual Appendix. If you have *any*
0efdf0fe 299problems at this stage, please send a bug report :ref:`bug-reports`.
42fc5d26
QY
300
301::
302
dc5564c7
QY
303 $ ./bootstrap.sh
304 $ ./configure <appropriate to your system>
305 $ make
44f2550e 306
42fc5d26 307
42fc5d26
QY
308Install the Software
309====================
310
311Installing the software to your system consists of copying the compiled
312programs and supporting files to a standard location. After the
313installation process has completed, these files have been copied
314from your work directory to :file:`/usr/local/bin`, and :file:`/usr/local/etc`.
315
316To install the FRR suite, issue the following command at your shell
dc5564c7 317prompt:::
44f2550e 318
dc5564c7 319 $ make install
42fc5d26
QY
320
321FRR daemons have their own terminal interface or VTY. After
322installation, you have to setup each beast's port number to connect to
dc5564c7 323them. Please add the following entries to :file:`/etc/services`.
42fc5d26
QY
324
325::
326
327 zebrasrv 2600/tcp # zebra service
328 zebra 2601/tcp # zebra vty
329 ripd 2602/tcp # RIPd vty
330 ripngd 2603/tcp # RIPngd vty
331 ospfd 2604/tcp # OSPFd vty
332 bgpd 2605/tcp # BGPd vty
333 ospf6d 2606/tcp # OSPF6d vty
334 ospfapi 2607/tcp # ospfapi
335 isisd 2608/tcp # ISISd vty
336 nhrpd 2610/tcp # nhrpd vty
337 pimd 2611/tcp # PIMd vty
44f2550e 338
42fc5d26
QY
339
340If you use a FreeBSD newer than 2.2.8, the above entries are already
341added to :file:`/etc/services` so there is no need to add it. If you
342specify a port number when starting the daemon, these entries may not be
343needed.
344
345You may need to make changes to the config files in
0efdf0fe 346|INSTALL_PREFIX_ETC|. :ref:`config-commands`.
42fc5d26 347
8fa64b2a 348.. [#] GNU/Linux has very flexible kernel configuration features.