这个是从安装光盘上拷贝的包:
rpm -Uvh net-snmp-libs-5.3.1-19.el5.i386.rpm
rpm -Uvh net-snmp-libs-5.3.1-19.el5.i386.rpm
rpm -Uvh net-snmp-5.3.1-19.el5.x86_64.rpm
rpm -Uvh net-snmp-perl-5.3.1-19.el5.x86_64.rpm
rpm -Uvh net-snmp-utils-5.3.1-19.el5.x86_64.rpm
注:如果你机器内没有snmpwalk和snmpge命令,请到安装盘里查找 net-snmp-utils 包,rpm -ivh net-snmp-utils-*.rpm 只后这两个命令就在系统里了。其他包也都在安装盘里 确保安装这四个包就OK
/etc/snmp/snmpd.conf (查看cat /etc/snmp/snmpd.conf |grep -v "#" |grep '^$')
com2sec notConfigUser xxx.xxx.xxx.xxx public
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view systemview included .1.3.6.1.2.1.1
view systemview included .1.3.6.1.2.1.25.1.1
access notConfigGroup "" any noauth exact all none none
view all included .1 80
syslocation Unknown (edit /etc/snmp/snmpd.conf)
syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf)
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
注:把其中的xxx.xxx.xxx.xxx改成你的IP
查看是否设置成功:snmpwalk -v 2c -c public 220.194.1.22 if
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21070542/viewspace-606587/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/21070542/viewspace-606587/