红联Linux门户
Linux帮助

CentOS 6源码编译安装Quagga-0.99-20

发布时间:2014-07-27 22:01:55来源:linux网站作者:siwind

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