blob: 78379a8b62a9e08133942a2773c46b01064feba9 [file] [log] [blame]
paul718e3742002-12-13 20:15:29 +00001@node Installation, Basic commands, Overview, Top
2@comment node-name, next, previous, up
3@chapter Installation
4
paul7190f4e2003-08-12 12:40:20 +00005@cindex How to install Quagga
paul718e3742002-12-13 20:15:29 +00006@cindex Installation
paul7190f4e2003-08-12 12:40:20 +00007@cindex Installing Quagga
paul718e3742002-12-13 20:15:29 +00008@cindex Building the system
paul7190f4e2003-08-12 12:40:20 +00009@cindex Making Quagga
paul718e3742002-12-13 20:15:29 +000010
11 There are three steps for installing the software: configuration,
12compilation, and installation.
13
14@menu
15* Configure the Software::
16* Build the Software::
17* Install the Software::
18@end menu
19
paul7190f4e2003-08-12 12:40:20 +000020 The easiest way to get Quagga running is to issue the following
paul718e3742002-12-13 20:15:29 +000021commands:
22
23@example
24% configure
25% make
26% make install
27@end example
28
29@node Configure the Software, Build the Software, Installation, Installation
30@comment node-name, next, previous, up
31@section Configure the Software
32
33@cindex Configuration options
34@cindex Options for configuring
35@cindex Build options
36@cindex Distribution configuration
37@cindex Options to @code{./configure}
38
paul7190f4e2003-08-12 12:40:20 +000039 Quagga has an excellent configure script which
paul718e3742002-12-13 20:15:29 +000040automatically detects most host configurations. There are several
41additional configure options you can use to turn off IPv6 support, to
42disable the compilation of specific daemons, and to enable SNMP support.
43
44@table @option
45@item --enable-guile
46Turn on compilation of the zebra-guile interpreter. You will need the
47guile library to make this. zebra-guile implementation is not yet
48finished. So this option is only useful for zebra-guile developers.
49@item --disable-ipv6
paul7190f4e2003-08-12 12:40:20 +000050Turn off IPv6 related features and daemons. Quagga configure script
paul718e3742002-12-13 20:15:29 +000051automatically detects IPv6 stack. But sometimes you might want to
paul7190f4e2003-08-12 12:40:20 +000052disable IPv6 support of Quagga.
paul718e3742002-12-13 20:15:29 +000053@item --disable-zebra
54Do not build zebra daemon.
55@item --disable-ripd
56Do not build ripd.
57@item --disable-ripngd
58Do not build ripngd.
59@item --disable-ospfd
60Do not build ospfd.
61@item --disable-ospf6d
62Do not build ospf6d.
63@item --disable-bgpd
64Do not build bgpd.
65@item --disable-bgp-announce
66Make @command{bgpd} which does not make bgp announcements at all. This
67feature is good for using @command{bgpd} as a BGP announcement listener.
68@item --enable-netlink
paul7190f4e2003-08-12 12:40:20 +000069Force to enable @sc{gnu}/Linux netlink interface. Quagga configure
paul718e3742002-12-13 20:15:29 +000070script detects netlink interface by checking a header file. When the header
71file does not match to the current running kernel, configure script will
72not turn on netlink support.
73@item --enable-snmp
74Enable SNMP support. By default, SNMP support is disabled.
paul971a4492003-06-20 01:18:07 +000075@item --enable-opaque-lsa
76Enable support for Opaque LSAs (RFC2370) in ospfd.
77@item --disable-ospfapi
78Disable support for OSPF-API, an API to interface directly with ospfd.
79OSPF-API is enabled if --enable-opaque-lsa is set.
80@item --disable-ospfclient
81Disable building of the example OSPF-API client.
82@item --enable-ospf-te
83Enable support for OSPF Traffic Engineering Extension (internet-draft) this
84requires support for Opaque LSAs.
85@item --enable-multipath=@var{ARG}
86Enable support for Equal Cost Multipath. @var{ARG} is the maximum number
87of ECMP paths to allow, set to 0 to allow unlimited number of paths.
88@item --enable-rtadv
89Enable support IPV6 router advertisement in zebra.
paul718e3742002-12-13 20:15:29 +000090@end table
91
92You may specify any combination of the above options to the configure
93script. By default, the executables are placed in @file{/usr/local/sbin}
94and the configuration files in @file{/usr/local/etc}. The @file{/usr/local/}
95installation prefix and other directories may be changed using the following
96options to the configuration script.
97
98@table @option
99@item --prefix=@var{prefix}
100Install architecture-independent files in @var{prefix} [/usr/local].
101@item --sysconfdir=@var{dir}
paul971a4492003-06-20 01:18:07 +0000102Look for configuration files in @var{dir} [@var{prefix}/etc]. Note
103that sample configuration files will be installed here.
104@item --localstatedir=@var{dir}
105Configure zebra to use @var{dir} for local state files, such
106as pid files and unix sockets.
paul718e3742002-12-13 20:15:29 +0000107@end table
108
paul971a4492003-06-20 01:18:07 +0000109Additionally, you may configure zebra to drop its elevated
110privileges shortly after startup and switch
111to another user, there are three configure options
112to control zebra's behaviour.
113
114@table @option
115@item --enable-user=@var{user}
116Switch to user @var{ARG} shortly after startup, and run as user @var{ARG}
117in normal operation.
118@item --enable-group=@var{group}
119Switch real and effective group to @var{group} shortly after
120startup.
121@item --enable-vty-group=@var{group}
122Create Unix Vty sockets (for use with vtysh) with group owndership set to
123@var{group}. This allows one to create a seperate group which is
124restricted to accessing only the Vty sockets, hence allowing one to
125delegate this group to individual users, or to run vtysh setgid to
126this group.
127@end table
128
paul7190f4e2003-08-12 12:40:20 +0000129The default user and group which will be configured is 'quagga' if no user
paul971a4492003-06-20 01:18:07 +0000130or group is specified. Note that this user or group requires write access
131to the local state directory (see --localstatedir) and requires at least
132read access, and write access if you wish to allow daemons
133to write out their configuration, to the configuration directory
134(see --sysconfdir).
135
136On systems which have the 'libcap' capabilities manipulation library
paul7190f4e2003-08-12 12:40:20 +0000137(currently only linux), the quagga system will retain
paul971a4492003-06-20 01:18:07 +0000138only minimal capabilities required, further it will only raise these
paul7190f4e2003-08-12 12:40:20 +0000139capabilities for brief periods. On systems without libcap, quagga will run
paul971a4492003-06-20 01:18:07 +0000140as the user specified and only raise its uid back to uid 0 for brief
141periods.
142
paul718e3742002-12-13 20:15:29 +0000143@example
144% ./configure --disable-ipv6
145@end example
146
147This command will configure zebra and the routing daemons.
148
paul7190f4e2003-08-12 12:40:20 +0000149@cindex Configuring Quagga
paul718e3742002-12-13 20:15:29 +0000150@cindex Configuration the software build
151@cindex Building on Linux boxes
152@cindex Linux configurations
153
154There are several options available only to @sc{gnu}/Linux systems:
155@footnote{GNU/Linux has very flexible kernel configuration features. If
156you use GNU/Linux, make sure that the current kernel configuration is
paul7190f4e2003-08-12 12:40:20 +0000157what you want. Quagga will run with any kernel configuration but some
paul718e3742002-12-13 20:15:29 +0000158recommendations do exist.
159
160@table @var
161
162@item CONFIG_NETLINK
163Kernel/User netlink socket.
164This is a brand new feature which enables
paul7190f4e2003-08-12 12:40:20 +0000165an advanced interface between the Linux kernel and zebra (@pxref{Kernel Interface}).
paul718e3742002-12-13 20:15:29 +0000166
167@item CONFIG_RTNETLINK
168Routing messages.
169This makes it possible to receive netlink routing messages. If you
170specify this option, @command{zebra} can detect routing information
171updates directly from the kernel (@pxref{Kernel Interface}).
172
173@item CONFIG_IP_MULTICAST
174IP: multicasting.
175This option should be specified when you use @command{ripd} or
176@command{ospfd} because these protocols use multicast.
177
178@end table
179
180IPv6 support has been added in @sc{gnu}/Linux kernel version 2.2. If you
paul7190f4e2003-08-12 12:40:20 +0000181try to use the Quagga IPv6 feature on a @sc{gnu}/Linux kernel, please
paul718e3742002-12-13 20:15:29 +0000182make sure the following libraries have been installed. Please note that
183these libraries will not be needed when you uses @sc{gnu} C library 2.1
184or upper.
185
186@table @code
187
188@item inet6-apps
189The @code{inet6-apps} package includes basic IPv6 related libraries such
190as @code{inet_ntop} and @code{inet_pton}. Some basic IPv6 programs such
191as @command{ping}, @command{ftp}, and @command{inetd} are also
192included. The @code{inet-apps} can be found at
193@url{ftp://ftp.inner.net/pub/ipv6/}.
194
195@item net-tools
196The @code{net-tools} package provides an IPv6 enabled interface and
197routing utility. It contains @command{ifconfig}, @command{route},
198@command{netstat}, and other tools. @code{net-tools} may be found at
199@url{http://www.tazenda.demon.co.uk/phil/net-tools/}.
200
201@end table
202@c A - end of footnote
203}.
204
205@node Build the Software, Install the Software, Configure the Software, Installation
206@comment node-name, next, previous, up
207@section Build the Software
208
209After configuring the software, you will need to compile it for your
210system. Simply issue the command @command{make} in the root of the source
211directory and the software will be compiled. If you have *any* problems
212at this stage, be certain to send a bug report @xref{Bug Reports}.
213
214@example
215% ./configure
216.
217.
218.
219./configure output
220.
221.
222.
223% make
224@end example
225@c A - End of node, Building the Software
226
227
228@node Install the Software, , Build the Software, Installation
229@comment node-name, next, previous, up
230@section Install the Software
231
232Installing the software to your system consists of copying the compiled
233programs and supporting files to a standard location. After the
234installation process has completed, these files have been copied
235from your work directory to @file{/usr/local/bin}, and @file{/usr/local/etc}.
236
paul7190f4e2003-08-12 12:40:20 +0000237To install the Quagga suite, issue the following command at your shell
paul718e3742002-12-13 20:15:29 +0000238prompt: @command{make install}.
239
240@example
241%
242% make install
243%
244@end example
245
246@c A - removed this section and placed it with Install the Software
247@c @node Additional Notes, , Install the Software, Installation
248@comment node-name, next, previous, up
249@c @section Additional Notes
250
paul7190f4e2003-08-12 12:40:20 +0000251Quagga daemons have their own terminal interface or VTY. After
paul718e3742002-12-13 20:15:29 +0000252installation, you have to setup each beast's port number to connect to
253them. Please add the following entries to @file{/etc/services}.
254
255@example
256zebrasrv 2600/tcp # zebra service
257zebra 2601/tcp # zebra vty
258ripd 2602/tcp # RIPd vty
259ripngd 2603/tcp # RIPngd vty
260ospfd 2604/tcp # OSPFd vty
261bgpd 2605/tcp # BGPd vty
262ospf6d 2606/tcp # OSPF6d vty
jardin5a514b12003-12-23 10:50:21 +0000263ospfapi 2607/tcp # ospfapi
264isisd 2608/tcp # ISISd vty
paul718e3742002-12-13 20:15:29 +0000265@end example
266
267If you use a FreeBSD newer than 2.2.8, the above entries are already
268added to @file{/etc/services} so there is no need to add it. If you
269specify a port number when starting the daemon, these entries may not be
270needed.
271
272You may need to make changes to the config files in
273@file{@value{INSTALL_PREFIX_ETC}/*.conf}. @xref{Config Commands}.