ubuntu下安装quagga-0.99.19.tar.gz

来源:互联网 发布:linux dhcp server 编辑:程序博客网 时间:2024/05/22 01:54

1、解压tar xzvf quagga-0.99.19.tar.gz

2、配置: ./configure --prefix=/usr

                --sysconfdir=/etc/quagga
                --localstatedir=/var/run/quagga
                --enable-vtysh
                --enable-user='test'
                --enable-group='test'
                 --enable-vty-group='test'
可能会报一个错误:checking for gawk... not-in-PATH configure: error: GNU awk is required for lib/memtype.h made···解决方法:sudo apt-get install gawk
配置输出:
Quagga configuration
--------------------
quagga version          : 0.99.19
host operating system  : linux-gnu
source code location    : .
compiler                : gcc
compiler flags          : -Os -fno-omit-frame-pointer -g -std=gnu99 -Wall -Wsign-compare -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wchar-subscripts -Wcast-qual
make                    : make
includes                :  
linker flags            :  -lcrypt   -lrt   -ltermcap -lreadline -lm
state file directory    : /var/run/quagga
config file directory   : /etc/quagga
example directory       : /etc/quagga
user to run as : test
group to run as : test
group for vty sockets : test
config file mask        : 0600
log file mask           : 0600

4、编译:make

5、安装:make install

自己安装了一遍,没成功后直接sudo apt-get install quagga装了。

注:上面的安装过程可省略为:sudo apt-get install quagga

6、添加test组和用户

groupadd test;
useradd test -g test
7、改变权限 //最好写入启动脚本

chown test:test /var/run/quagga

chmod 777 /var/run/quagga   
chown test:test /etc/quagga //需要将配置写入操作系统
chmod 777 /etc/quagga/*                    
8、增加log权限//最好写入启动脚本

mkdir  /var/log/quagga/

vi /var/log/quagga/zebra.log
chmod 777 /var/log/quagga/zebra.log

9、修改 /etc/services  //just for telnet

                zebrasrv    2600/tcp     # zebra service

                zebra         2601/tcp    # zebra vty
                ripd           2602/tcp    # RIPd vty
                ripngd       2603/tcp    # RIPngd vty
                ospfd        2604/tcp    # OSPFd vty
                bgpd         2605/tcp    # BGPd vty
                ospf6d      2606/tcp    # OSPF6d vty

                ospfapi     2607/tcp    # ospfapi

                isid           2608/tcp    # ISISd vty
10、 编辑配置文件

cp /etc/quagga/zebra.conf.example   /etc/quagga/zebra.conf

! -*- zebra -*-
!

! zebra sample configuration file

!
hostname Router
password zebra

enable password zebra

log file  /var/log/quagga/zebra.log//注意zebra.conf启用log,这样便于查找错误
11、启动
zebra –d
如果启动不成功,查看/var/log/quagga/zebra.log
一般由于权限设置会出现以下错误:

2008/10/22 16:59:22 ZEBRA: Could not lock pid_file /var/run/quagga/zebra.pid, exiting

12、登陆

telnet localhost zebra(0r 2601)
[root@localhost quagga-0.99.10]# telnet localhost 2601

Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Hello, this is Quagga (version 0.99.13).
Copyright 1996-2005 Kunihiro Ishiguro, et al.


User Access Verification

 
Password:
Router> enable
Password:
Router# help

Quagga VTY provides advanced help feature.  When you need help,
anytime at the command line please press '?'.

If nothing matches, the help list will be empty and you must backup
 until entering a '?' shows the available options.
Two styles of help are provided:
1. Full help is available when you are ready to enter a
command argument (e.g. 'show ?') and describes each possible
argument.
2. Partial help is provided when an abbreviated argument is entered
   and you want to know what arguments match the input
   (e.g. 'show me?'.)

Router#

13、使用

具体使用参考http://sslab.cs.nthu.edu.tw/~welentsai/rip_quagga.htm


本文转自:http://blog.chinaunix.net/u2/79955/showart_1332595.html
并修改了其中部分内容。

1 1
原创粉丝点击