quagga安装 1.软件依赖 automake: 1.9.6 (released 2005-07-10) autoconf: 2.59 (2.60 on 2006-06-26 is too recent to require) libtool: 1.5.22 (released 2005-12-18) texinfo: 4.7 (released 2004-04-10; 4.8 is not yet common) GNU AWK: gawk3.1.5 (released 2005-08-12)

错误提示1、 configure: error: vtysh needs libreadline but was not found and usable on your system. yum install readline-devel 错误提示2、 checking for CARES... configure: error: Package requirements (libcares) were not met:

No package 'libcares' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables CARES_CFLAGS and CARES_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. 下载文件包:c-ares-1.12.0.tar

https://c-ares.haxx.se/download/ 解压, Configure Make Make install cp libcares.pc /usr/local/lib/pkgconfig PKG_CONFIG_PATH=/usr/local/lib/pkgconfig export PKG_CONFIG_PATH 用第三方库,就少不了要使用到第三方的头文件和库文件。我们在编译、链接的时候,必须要指定这些头文件和库文件的位置。

tar zxvf quagga-quagga-1.2.2 cd quagga-quagga-1.2.2 ./bootstrap.sh mkdir /usr/local/zebra ./configure --prefix=/usr/local/zebra --enable-user=root --enable-group=root --enable-vty-group=root Quagga configuration

quagga version : 1.2.2 host operating system : linux-gnu source code location : . compiler : gcc -std=gnu99 compiler flags : -g -O2 -g -Os --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -fpie -fno-omit-frame-pointer -Wall -Wextra -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers make : make linker flags : -lcrypt -lrt -lreadline -ltermcap -lm state file directory : /var/run config file directory : /usr/local/zebra/etc example directory : /usr/local/zebra/etc user to run as : root group to run as : root group for vty sockets : root config file mask : 0600 log file mask : 0600 zebra protobuf enabled : no

The above user and group must have read/write access to the state file directory and to the config files in the config file directory. make && make install

cd /usr/local/zebra/etc/ cp bgpd.conf.sample bgpd.conf cp isisd.conf.sample isisd.conf cp ospfd.conf.sample ospfd.conf cp vtysh.conf.sample vtysh.conf cp zebra.conf.sample zebra.conf

vi /etc/rc.local ##zebra config /usr/local/zebra/sbin/zebra -d & /usr/local/zebra/sbin/bgpd -d & /usr/local/zebra/sbin/isisd -d & /usr/local/zebra/sbin/ospfd -d &

vi .bash_profile PATH=$PATH:$HOME/bin:/usr/local/zebra/bin:/usr/local/zebra/sbin export PATH

yum install conntrack-tools vi /etc/conntrackd/conntrackd.conf General { Nice -1 HashSize 262144 HashLimit 655350 LogFile on LockFile /var/lock/conntrack.lock UNIX { Path /var/run/conntrackd.ctl Backlog 20 } NetlinkBufferSizeMaxGrowth 655355 Filter { Protocol Accept { TCP udp } Address Ignore { IPv4_address 127.0.0.1 # loopback } } } Stats { LogFile /natlog/conn.log }