blob: 1e8d965bcf9a52b44261f7080fb391811182968c [file] [log] [blame]
paul76b89b42004-11-06 17:13:09 +00001@node Installation
paul718e3742002-12-13 20:15:29 +00002@chapter Installation
3
paul7190f4e2003-08-12 12:40:20 +00004@cindex How to install Quagga
paul718e3742002-12-13 20:15:29 +00005@cindex Installation
paul7190f4e2003-08-12 12:40:20 +00006@cindex Installing Quagga
paul718e3742002-12-13 20:15:29 +00007@cindex Building the system
paul7190f4e2003-08-12 12:40:20 +00008@cindex Making Quagga
paul718e3742002-12-13 20:15:29 +00009
paul76b89b42004-11-06 17:13:09 +000010There are three steps for installing the software: configuration,
paul718e3742002-12-13 20:15:29 +000011compilation, and installation.
12
13@menu
paul76b89b42004-11-06 17:13:09 +000014* Configure the Software::
15* Build the Software::
16* Install the Software::
paul718e3742002-12-13 20:15:29 +000017@end menu
18
paul76b89b42004-11-06 17:13:09 +000019The easiest way to get Quagga running is to issue the following
paul718e3742002-12-13 20:15:29 +000020commands:
21
22@example
23% configure
24% make
25% make install
26@end example
27
paul76b89b42004-11-06 17:13:09 +000028@node Configure the Software
paul718e3742002-12-13 20:15:29 +000029@section Configure the Software
30
paul76b89b42004-11-06 17:13:09 +000031@menu
32* The Configure script and its options::
33* Least-Privilege support::
34* Linux notes::
35@end menu
36
37@node The Configure script and its options
38@subsection The Configure script and its options
39
paul718e3742002-12-13 20:15:29 +000040@cindex Configuration options
41@cindex Options for configuring
42@cindex Build options
43@cindex Distribution configuration
44@cindex Options to @code{./configure}
45
paul76b89b42004-11-06 17:13:09 +000046Quagga has an excellent configure script which automatically detects most
47host configurations. There are several additional configure options you can
48use to turn off IPv6 support, to disable the compilation of specific
49daemons, and to enable SNMP support.
paul718e3742002-12-13 20:15:29 +000050
51@table @option
paul718e3742002-12-13 20:15:29 +000052@item --disable-ipv6
paul7190f4e2003-08-12 12:40:20 +000053Turn off IPv6 related features and daemons. Quagga configure script
paul718e3742002-12-13 20:15:29 +000054automatically detects IPv6 stack. But sometimes you might want to
paul7190f4e2003-08-12 12:40:20 +000055disable IPv6 support of Quagga.
paul718e3742002-12-13 20:15:29 +000056@item --disable-zebra
57Do not build zebra daemon.
58@item --disable-ripd
59Do not build ripd.
60@item --disable-ripngd
61Do not build ripngd.
62@item --disable-ospfd
63Do not build ospfd.
64@item --disable-ospf6d
65Do not build ospf6d.
66@item --disable-bgpd
67Do not build bgpd.
68@item --disable-bgp-announce
69Make @command{bgpd} which does not make bgp announcements at all. This
70feature is good for using @command{bgpd} as a BGP announcement listener.
71@item --enable-netlink
paul7190f4e2003-08-12 12:40:20 +000072Force to enable @sc{gnu}/Linux netlink interface. Quagga configure
paul718e3742002-12-13 20:15:29 +000073script detects netlink interface by checking a header file. When the header
74file does not match to the current running kernel, configure script will
75not turn on netlink support.
76@item --enable-snmp
77Enable SNMP support. By default, SNMP support is disabled.
David Lamparter7d50ad42012-11-03 11:19:52 -070078@item --disable-opaque-lsa
79Disable support for Opaque LSAs (RFC2370) in ospfd.
paul971a4492003-06-20 01:18:07 +000080@item --disable-ospfapi
81Disable support for OSPF-API, an API to interface directly with ospfd.
82OSPF-API is enabled if --enable-opaque-lsa is set.
83@item --disable-ospfclient
84Disable building of the example OSPF-API client.
David Lamparter7d50ad42012-11-03 11:19:52 -070085@item --disable-ospf-te
86Disable support for OSPF Traffic Engineering Extension (internet-draft) this
paul971a4492003-06-20 01:18:07 +000087requires support for Opaque LSAs.
88@item --enable-multipath=@var{ARG}
89Enable support for Equal Cost Multipath. @var{ARG} is the maximum number
90of ECMP paths to allow, set to 0 to allow unlimited number of paths.
David Lamparter7d50ad42012-11-03 11:19:52 -070091@item --disable-rtadv
92Disable support IPV6 router advertisement in zebra.
93@item --disable-tests
94Do not build tests. Test programs are built by default, but not ran or
95installed. They can be excluded from build with this option, which will
96minimally decrease compile time and overhead. They can always be built and
97executed at a later time by running @command{make check} in the @file{tests/}
98subdirectory, even if they're excluded from build.
David Lamparter8c99b4c2013-08-01 07:43:36 +000099@item --enable-gcc-rdynamic
100Pass the @command{-rdynamic} option to the linker driver. This is in most
101cases neccessary for getting usable backtraces. This option defaults to on
102if the compiler is detected as gcc, but giving an explicit enable/disable is
103suggested.
104@item --enable-backtrace
105Controls backtrace support for the crash handlers. This is autodetected by
106default. Using the switch will enforce the requested behaviour, failing with
107an error if support is requested but not available. On BSD systems, this
108needs libexecinfo, while on glibc support for this is part of libc itself.
paul718e3742002-12-13 20:15:29 +0000109@end table
110
111You may specify any combination of the above options to the configure
112script. By default, the executables are placed in @file{/usr/local/sbin}
113and the configuration files in @file{/usr/local/etc}. The @file{/usr/local/}
114installation prefix and other directories may be changed using the following
115options to the configuration script.
116
117@table @option
118@item --prefix=@var{prefix}
119Install architecture-independent files in @var{prefix} [/usr/local].
120@item --sysconfdir=@var{dir}
paul971a4492003-06-20 01:18:07 +0000121Look for configuration files in @var{dir} [@var{prefix}/etc]. Note
122that sample configuration files will be installed here.
123@item --localstatedir=@var{dir}
124Configure zebra to use @var{dir} for local state files, such
125as pid files and unix sockets.
paul718e3742002-12-13 20:15:29 +0000126@end table
127
paul76b89b42004-11-06 17:13:09 +0000128@example
129% ./configure --disable-ipv6
130@end example
131
132This command will configure zebra and the routing daemons.
133
134@node Least-Privilege support
135@subsection Least-Privilege support
136
137@cindex Quagga Least-Privileges
138@cindex Quagga Privileges
139
140Additionally, you may configure zebra to drop its elevated privileges
141shortly after startup and switch to another user. The configure script will
142automatically try to configure this support. There are three configure
143options to control the behaviour of Quagga daemons.
paul971a4492003-06-20 01:18:07 +0000144
145@table @option
146@item --enable-user=@var{user}
147Switch to user @var{ARG} shortly after startup, and run as user @var{ARG}
148in normal operation.
149@item --enable-group=@var{group}
150Switch real and effective group to @var{group} shortly after
151startup.
152@item --enable-vty-group=@var{group}
153Create Unix Vty sockets (for use with vtysh) with group owndership set to
154@var{group}. This allows one to create a seperate group which is
155restricted to accessing only the Vty sockets, hence allowing one to
156delegate this group to individual users, or to run vtysh setgid to
157this group.
158@end table
159
paul7190f4e2003-08-12 12:40:20 +0000160The default user and group which will be configured is 'quagga' if no user
paul76b89b42004-11-06 17:13:09 +0000161or group is specified. Note that this user or group requires write access to
162the local state directory (see --localstatedir) and requires at least read
163access, and write access if you wish to allow daemons to write out their
164configuration, to the configuration directory (see --sysconfdir).
paul971a4492003-06-20 01:18:07 +0000165
166On systems which have the 'libcap' capabilities manipulation library
paul76b89b42004-11-06 17:13:09 +0000167(currently only linux), the quagga system will retain only minimal
168capabilities required, further it will only raise these capabilities for
169brief periods. On systems without libcap, quagga will run as the user
170specified and only raise its uid back to uid 0 for brief periods.
paul971a4492003-06-20 01:18:07 +0000171
paul76b89b42004-11-06 17:13:09 +0000172@node Linux notes
173@subsection Linux Notes
paul718e3742002-12-13 20:15:29 +0000174
paul7190f4e2003-08-12 12:40:20 +0000175@cindex Configuring Quagga
paul718e3742002-12-13 20:15:29 +0000176@cindex Building on Linux boxes
177@cindex Linux configurations
178
179There are several options available only to @sc{gnu}/Linux systems:
paul76b89b42004-11-06 17:13:09 +0000180@footnote{@sc{gnu}/Linux has very flexible kernel configuration features}. If
181you use @sc{gnu}/Linux, make sure that the current kernel configuration is
paul7190f4e2003-08-12 12:40:20 +0000182what you want. Quagga will run with any kernel configuration but some
paul718e3742002-12-13 20:15:29 +0000183recommendations do exist.
184
185@table @var
186
187@item CONFIG_NETLINK
paul76b89b42004-11-06 17:13:09 +0000188Kernel/User netlink socket. This is a brand new feature which enables an
189advanced interface between the Linux kernel and zebra (@pxref{Kernel Interface}).
paul718e3742002-12-13 20:15:29 +0000190
191@item CONFIG_RTNETLINK
192Routing messages.
193This makes it possible to receive netlink routing messages. If you
194specify this option, @command{zebra} can detect routing information
195updates directly from the kernel (@pxref{Kernel Interface}).
196
197@item CONFIG_IP_MULTICAST
198IP: multicasting.
paul76b89b42004-11-06 17:13:09 +0000199This option should be specified when you use @command{ripd} (@pxref{RIP}) or
200@command{ospfd} (@pxref{OSPFv2}) because these protocols use multicast.
paul718e3742002-12-13 20:15:29 +0000201
202@end table
203
204IPv6 support has been added in @sc{gnu}/Linux kernel version 2.2. If you
paul7190f4e2003-08-12 12:40:20 +0000205try to use the Quagga IPv6 feature on a @sc{gnu}/Linux kernel, please
paul718e3742002-12-13 20:15:29 +0000206make sure the following libraries have been installed. Please note that
207these libraries will not be needed when you uses @sc{gnu} C library 2.1
208or upper.
209
210@table @code
211
212@item inet6-apps
213The @code{inet6-apps} package includes basic IPv6 related libraries such
214as @code{inet_ntop} and @code{inet_pton}. Some basic IPv6 programs such
215as @command{ping}, @command{ftp}, and @command{inetd} are also
216included. The @code{inet-apps} can be found at
paul76b89b42004-11-06 17:13:09 +0000217@uref{ftp://ftp.inner.net/pub/ipv6/}.
paul718e3742002-12-13 20:15:29 +0000218
219@item net-tools
220The @code{net-tools} package provides an IPv6 enabled interface and
221routing utility. It contains @command{ifconfig}, @command{route},
222@command{netstat}, and other tools. @code{net-tools} may be found at
paul76b89b42004-11-06 17:13:09 +0000223@uref{http://www.tazenda.demon.co.uk/phil/net-tools/}.
paul718e3742002-12-13 20:15:29 +0000224
225@end table
226@c A - end of footnote
paul718e3742002-12-13 20:15:29 +0000227
paul76b89b42004-11-06 17:13:09 +0000228@node Build the Software
paul718e3742002-12-13 20:15:29 +0000229@section Build the Software
230
231After configuring the software, you will need to compile it for your
232system. Simply issue the command @command{make} in the root of the source
233directory and the software will be compiled. If you have *any* problems
234at this stage, be certain to send a bug report @xref{Bug Reports}.
235
236@example
237% ./configure
238.
239.
240.
241./configure output
242.
243.
244.
245% make
246@end example
247@c A - End of node, Building the Software
248
249
paul76b89b42004-11-06 17:13:09 +0000250@node Install the Software
paul718e3742002-12-13 20:15:29 +0000251@comment node-name, next, previous, up
252@section Install the Software
253
254Installing the software to your system consists of copying the compiled
255programs and supporting files to a standard location. After the
256installation process has completed, these files have been copied
257from your work directory to @file{/usr/local/bin}, and @file{/usr/local/etc}.
258
paul7190f4e2003-08-12 12:40:20 +0000259To install the Quagga suite, issue the following command at your shell
paul718e3742002-12-13 20:15:29 +0000260prompt: @command{make install}.
261
262@example
263%
264% make install
265%
266@end example
267
paul7190f4e2003-08-12 12:40:20 +0000268Quagga daemons have their own terminal interface or VTY. After
paul718e3742002-12-13 20:15:29 +0000269installation, you have to setup each beast's port number to connect to
270them. Please add the following entries to @file{/etc/services}.
271
272@example
273zebrasrv 2600/tcp # zebra service
274zebra 2601/tcp # zebra vty
275ripd 2602/tcp # RIPd vty
276ripngd 2603/tcp # RIPngd vty
277ospfd 2604/tcp # OSPFd vty
278bgpd 2605/tcp # BGPd vty
279ospf6d 2606/tcp # OSPF6d vty
jardin5a514b12003-12-23 10:50:21 +0000280ospfapi 2607/tcp # ospfapi
281isisd 2608/tcp # ISISd vty
paul718e3742002-12-13 20:15:29 +0000282@end example
283
284If you use a FreeBSD newer than 2.2.8, the above entries are already
285added to @file{/etc/services} so there is no need to add it. If you
286specify a port number when starting the daemon, these entries may not be
287needed.
288
289You may need to make changes to the config files in
290@file{@value{INSTALL_PREFIX_ETC}/*.conf}. @xref{Config Commands}.