- yum -y remove net-snmp net-snmp-utils mrtg
- rm -rf /var/www/mrtg
- rm -rf /etc/snmp
- rm -rf /etc/mrtg
at /usr/bin/../lib64/mrtg2/SNMP_util.pm line 492
SNMPGET Problem for ifHCInOctets.2 ifHCOutOctets.2 sysUptime sysName on snmp@127.0.0.1:::::2:v4only
yum update
cpan สั่ง install IO-Socket-INET6
yum -y install perl-Net-SNMP
- yum -y install net-snmp net-snmp-utils mrtg mrtg-libs
- echo -e "syslocation Thailand\nsyscontact admin\nsysservices 79\nrocommunity snmp 127.0.0.1\nagentaddress 127.0.0.1" > /etc/snmp/snmpd.conf
- vi /etc/mrtg/mrtg.cfg
- wget http://nakhonitech.net/plugin/mrtg_cfg.txt -O /etc/mrtg/mrtg.cfg
- mkdir -p /var/www/html/mrtg
- indexmaker --columns=2 --output=/var/www/html/mrtg/index.html /etc/mrtg/mrtg.cfg
- chkconfig snmpd on
- echo "*/5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok > /dev/null 2>&1" > /etc/cron.d/mrtg
- /etc/init.d/snmpd restart