首页 > 代码库 > 安装Quagga路由软件
安装Quagga路由软件
>
#!/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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。