install.texi 10 KB

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