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