码迷,mamicode.com
首页 > 其他好文 > 详细

安装Quagga路由软件

时间:2014-07-21 10:31:21      阅读:260      评论:0      收藏:0      [点我收藏+]

标签:os   for   re   c   c++   line   

>
#!/bin/bash
要先下载好软件:quagga-0.99.19.tar.gz
	cp /etc/yum.conf /etc/yum.conf.lnmp
	sed -i ‘s:exclude=.*:exclude=:g‘ /etc/yum.conf
	for packages in gcc gcc-c++ ncurses-devel libxml2-devel openssl-devel curl-devel libjpeg-devel libpng-devel autoconf pcre-devel libtool-libs freetype-devel gd zlib-devel zip unzip wget crontabs iptables file bison cmake patch mlocate flex diffutils automake make  readline-devel  glibc-devel glibc-static glib2-devel  bzip2-devel gettext-devel libcap-devel logrotate telnet openssl expect; do 
		echo "[${packages} Installing] ***************************** >>";
		yum -y install $packages; 
	done;
	mv -f /etc/yum.conf.lnmp /etc/yum.conf;
		tar zxvf quagga-0.99.19.tar.gz;
		cd quagga-0.99.19
		./configure --prefix=/usr/local/quagga                 --sysconfdir=/etc/quagga                  --localstatedir=/var/run/quagga                  --enable-vtysh                 --enable-user=‘test‘                 --enable-group=‘test‘                  --enable-vty-group=‘test‘
		make;
		make install;
		groupadd test;
		useradd test -g test;
		mkdir /var/run/quagga;
		chown test:test /var/run/quagga;
		chmod 777 /var/run/quagga;
		chown test:test /etc/quagga;
		chmod 777 /etc/quagga/*
		makedir  /var/log/quagga/
		touch /var/log/quagga/zebra.log
		chmod 777 /var/log/quagga/zebra.log
		cp /etc/quagga/zebra.conf.sample /etc/quagga/zebra.conf
		cp /etc/quagga/ripd.conf.sample /etc/quagga/ripd.conf
		cp /etc/quagga/ospfd.conf.sample /etc/quagga/ospfd.conf
		echo "log file  /var/log/quagga/zebra.log"  >> /etc/quagga/zebra.conf
		cp /etc/services  /etc/services.bak
		echo ‘zebrasrv    2600/tcp     # zebra service‘ >> /etc/services
            	echo ‘zebra         2601/tcp    # zebra vty‘    >> /etc/services
            	echo ‘ripd           2602/tcp    # RIPd vty‘    >> /etc/services
            	echo ‘ripngd       2603/tcp    # RIPngd vty‘   >> /etc/services
            	echo ‘ospfd        2604/tcp    # OSPFd vty‘    >> /etc/services
            	echo ‘bgpd         2605/tcp    # BGPd vty‘     >> /etc/services
            	echo ‘ospf6d      2606/tcp    # OSPF6d vty‘    >> /etc/services
            	echo ‘ospfapi     2607/tcp    # ospfapi‘      >> /etc/services
            	echo ‘isid           2608/tcp   ‘             >> /etc/services
		
		/etc/init.d/iptables stop;
#/usr/local/quagga/sbin/zebra -d	
#/usr/local/quagga/sbin/ripd -d
#/usr/local/quagga/sbin/ospfd -d
#telnet  localhost  ripd


安装Quagga路由软件,布布扣,bubuko.com

安装Quagga路由软件

标签:os   for   re   c   c++   line   

原文地址:http://my.oschina.net/jk409/blog/292933

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!