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