install.texi 9.7 KB

  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 --enable-gcc-rdynamic
  83. Pass the @command{-rdynamic} option to the linker driver. This is in most
  84. cases neccessary for getting usable backtraces. This option defaults to on
  85. if the compiler is detected as gcc, but giving an explicit enable/disable is
  86. suggested.
  87. @item --enable-backtrace
  88. Controls backtrace support for the crash handlers. This is autodetected by
  89. default. Using the switch will enforce the requested behaviour, failing with
  90. an error if support is requested but not available. On BSD systems, this
  91. needs libexecinfo, while on glibc support for this is part of libc itself.
  92. @end table
  93. You may specify any combination of the above options to the configure
  94. script. By default, the executables are placed in @file{/usr/local/sbin}
  95. and the configuration files in @file{/usr/local/etc}. The @file{/usr/local/}
  96. installation prefix and other directories may be changed using the following
  97. options to the configuration script.
  98. @table @option
  99. @item --prefix=@var{prefix}
  100. Install architecture-independent files in @var{prefix} [/usr/local].
  101. @item --sysconfdir=@var{dir}
  102. Look for configuration files in @var{dir} [@var{prefix}/etc]. Note
  103. that sample configuration files will be installed here.
  104. @item --localstatedir=@var{dir}
  105. Configure zebra to use @var{dir} for local state files, such
  106. as pid files and unix sockets.
  107. @end table
  108. @example
  109. % ./configure --disable-ipv6
  110. @end example
  111. This command will configure zebra and the routing daemons.
  112. @node Least-Privilege support
  113. @subsection Least-Privilege support
  114. @cindex Quagga Least-Privileges
  115. @cindex Quagga Privileges
  116. Additionally, you may configure zebra to drop its elevated privileges
  117. shortly after startup and switch to another user. The configure script will
  118. automatically try to configure this support. There are three configure
  119. options to control the behaviour of Quagga daemons.
  120. @table @option
  121. @item --enable-user=@var{user}
  122. Switch to user @var{ARG} shortly after startup, and run as user @var{ARG}
  123. in normal operation.
  124. @item --enable-group=@var{group}
  125. Switch real and effective group to @var{group} shortly after
  126. startup.
  127. @item --enable-vty-group=@var{group}
  128. Create Unix Vty sockets (for use with vtysh) with group owndership set to
  129. @var{group}. This allows one to create a seperate group which is
  130. restricted to accessing only the Vty sockets, hence allowing one to
  131. delegate this group to individual users, or to run vtysh setgid to
  132. this group.
  133. @end table
  134. The default user and group which will be configured is 'quagga' if no user
  135. or group is specified. Note that this user or group requires write access to
  136. the local state directory (see --localstatedir) and requires at least read
  137. access, and write access if you wish to allow daemons to write out their
  138. configuration, to the configuration directory (see --sysconfdir).
  139. On systems which have the 'libcap' capabilities manipulation library
  140. (currently only linux), the quagga system will retain only minimal
  141. capabilities required, further it will only raise these capabilities for
  142. brief periods. On systems without libcap, quagga will run as the user
  143. specified and only raise its uid back to uid 0 for brief periods.
  144. @node Linux notes
  145. @subsection Linux Notes
  146. @cindex Configuring Quagga
  147. @cindex Building on Linux boxes
  148. @cindex Linux configurations
  149. There are several options available only to @sc{gnu}/Linux systems:
  150. @footnote{@sc{gnu}/Linux has very flexible kernel configuration features}. If
  151. you use @sc{gnu}/Linux, make sure that the current kernel configuration is
  152. what you want. Quagga will run with any kernel configuration but some
  153. recommendations do exist.
  154. @table @var
  155. @item CONFIG_NETLINK
  156. Kernel/User netlink socket. This is a brand new feature which enables an
  157. advanced interface between the Linux kernel and zebra (@pxref{Kernel Interface}).
  159. Routing messages.
  160. This makes it possible to receive netlink routing messages. If you
  161. specify this option, @command{zebra} can detect routing information
  162. updates directly from the kernel (@pxref{Kernel Interface}).
  164. IP: multicasting.
  165. This option should be specified when you use @command{ripd} (@pxref{RIP}) or
  166. @command{ospfd} (@pxref{OSPFv2}) because these protocols use multicast.
  167. @end table
  168. IPv6 support has been added in @sc{gnu}/Linux kernel version 2.2. If you
  169. try to use the Quagga IPv6 feature on a @sc{gnu}/Linux kernel, please
  170. make sure the following libraries have been installed. Please note that
  171. these libraries will not be needed when you uses @sc{gnu} C library 2.1
  172. or upper.
  173. @table @code
  174. @item inet6-apps
  175. The @code{inet6-apps} package includes basic IPv6 related libraries such
  176. as @code{inet_ntop} and @code{inet_pton}. Some basic IPv6 programs such
  177. as @command{ping}, @command{ftp}, and @command{inetd} are also
  178. included. The @code{inet-apps} can be found at
  179. @uref{}.
  180. @item net-tools
  181. The @code{net-tools} package provides an IPv6 enabled interface and
  182. routing utility. It contains @command{ifconfig}, @command{route},
  183. @command{netstat}, and other tools. @code{net-tools} may be found at
  184. @uref{}.
  185. @end table
  186. @c A - end of footnote
  187. @node Build the Software
  188. @section Build the Software
  189. After configuring the software, you will need to compile it for your
  190. system. Simply issue the command @command{make} in the root of the source
  191. directory and the software will be compiled. If you have *any* problems
  192. at this stage, be certain to send a bug report @xref{Bug Reports}.
  193. @example
  194. % ./configure
  195. .
  196. .
  197. .
  198. ./configure output
  199. .
  200. .
  201. .
  202. % make
  203. @end example
  204. @c A - End of node, Building the Software
  205. @node Install the Software
  206. @comment node-name, next, previous, up
  207. @section Install the Software
  208. Installing the software to your system consists of copying the compiled
  209. programs and supporting files to a standard location. After the
  210. installation process has completed, these files have been copied
  211. from your work directory to @file{/usr/local/bin}, and @file{/usr/local/etc}.
  212. To install the Quagga suite, issue the following command at your shell
  213. prompt: @command{make install}.
  214. @example
  215. %
  216. % make install
  217. %
  218. @end example
  219. Quagga daemons have their own terminal interface or VTY. After
  220. installation, you have to setup each beast's port number to connect to
  221. them. Please add the following entries to @file{/etc/services}.
  222. @example
  223. zebrasrv 2600/tcp # zebra service
  224. zebra 2601/tcp # zebra vty
  225. ripd 2602/tcp # RIPd vty
  226. ripngd 2603/tcp # RIPngd vty
  227. ospfd 2604/tcp # OSPFd vty
  228. bgpd 2605/tcp # BGPd vty
  229. ospf6d 2606/tcp # OSPF6d vty
  230. ospfapi 2607/tcp # ospfapi
  231. isisd 2608/tcp # ISISd vty
  232. @end example
  233. If you use a FreeBSD newer than 2.2.8, the above entries are already
  234. added to @file{/etc/services} so there is no need to add it. If you
  235. specify a port number when starting the daemon, these entries may not be
  236. needed.
  237. You may need to make changes to the config files in
  238. @file{@value{INSTALL_PREFIX_ETC}/*.conf}. @xref{Config Commands}.