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