標籤:os for re c c++ line
>
#!/bin/bash要先下載好軟體:quagga-0.99.19.tar.gzcp /etc/yum.conf /etc/yum.conf.lnmpsed -i ‘s:exclude=.*:exclude=:g‘ /etc/yum.conffor 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.logchmod 777 /var/log/quagga/zebra.logcp /etc/quagga/zebra.conf.sample /etc/quagga/zebra.confcp /etc/quagga/ripd.conf.sample /etc/quagga/ripd.confcp /etc/quagga/ospfd.conf.sample /etc/quagga/ospfd.confecho "log file /var/log/quagga/zebra.log" >> /etc/quagga/zebra.confcp /etc/services /etc/services.bakecho ‘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