วันศุกร์ที่ 21 ตุลาคม พ.ศ. 2554

การติดตั้ง mrtg บน cenos

credit"http://www.icez.net/blog/28/%E0%B8%A5%E0%B8%87-mrtg-%E0%B8%9A%E0%B8%99-centosfedora-%E0%B9%81%E0%B8%9A%E0%B8%9A%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B9%86"

yum -y install net-snmp mrtg
wget -4 -O /etc/snmp/snmpd.conf www.icez.net/files/snmpd.conf
wget -4 -O /var/www/mrtg/mrtg-load.sh www.icez.net/files/mrtg-load.sh
chmod a+x /var/www/mrtg/mrtg-load.sh
/etc/init.d/snmpd restart
cfgmaker --global 'WorkDir: /var/www/mrtg' --global 'Options[_]: bits,growright' --output /var/www/mrtg/mrtg.cfg public@localhost
wget -4 -O /tmp/mrtg.cfg www.icez.net/files/mrtg.cfg
cat /tmp/mrtg.cfg >> /var/www/mrtg/mrtg.cfg
/bin/cp -fv /var/www/mrtg/mrtg.cfg /etc/mrtg/mrtg.cfg
echo "Alias /mrtg /var/www/mrtg" > /etc/httpd/conf.d/mrtg.conf
/sbin/chkconfig snmpd on
indexmaker /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html
/etc/init.d/httpd graceful

ไม่มีความคิดเห็น: