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' --no-down --zero-speed=1000000000 --noreversedns --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 if [ -d /usr/local/directadmin ]; then ln -s /var/www/mrtg /var/www/html/; fi /etc/init.d/httpd graceful
ที่มา http://www.icez.net/blog/28/ลง-mrtg-บน-centosfedora-แบบง่ายๆ