1.下載源碼包,編譯,安裝
#tar xzvf quagga-0.99-20.tar.gz
#cd quagga-0.99.20
#./configure
#make
#make install
安裝好後,可執行文件在目錄 /usr/local/sbin, 配置文件在/usr/local/etc
2. 拷貝zebra配置文件:
#sudo cp /usr/local/etc/zebra.conf.sample /usr/local/etc/zebra.conf
3. 運行:
#/usr/local/sbin/zebra -h //查看命令行選項
#sudo /usr/local/sbin/zebra -d -u root //-u 以root用戶運行!!
4.登錄zebra的TTY:
#telnet localhost 2601
//或者
#telnet localhost zebra
默認密碼:zebra
====================================
說明:
1) 如果不能使用telnet, 則安裝:
#sudo yum install telnet
2) selinux會影響zebra運行,關閉之:
/etc/selinux/config文件中,設置為:disable
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
3) 如果使用非特權用戶運行zebra, 則按如下操作:
編譯時指定 localstatdir
#./configure --localstatedir=/var/run/quagga --sysconfdir=/etc/quagga
#make
#make install
//添加quagga用戶
#sudo useradd -r -d /usr/local/sbin -s /sbin/nologin quagga
//拷貝配置文件
#sudo cp /etc/quagga/zebra.conf.sample /etc/quagga/zebra.conf
//設置localstatdir目錄
#sudo mkdir /var/run/quagga
#sudo chown quagga /var/run/quagga
#sudo chgrp quagga /var/run/quagga
//運行
#sudo /usr/local/sbin/zebra -d //以quagga用戶運行zebra