分分钟搞定Redhat的SNMP服务


首先,在安装盘里面找到snmp相关的rpm包,然后全部安装:

net-snmp-utils
net-snmp-libs
net-snmp

接着,搞定snmp.conf配置文件:

# cd /etc/snmp/
# mv snmpd.conf snmpd.conf.old

# vim snmpd.conf
编辑完成以下内容:
========================================================
com2sec notConfigUser default public
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
view systemview included .1
access notConfigGroup "" any noauth exact systemview none none
syslocation HOSTNAME
syscontact Root root@localhost
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat
========================================================
里面的“HOSTNAME”可以修改为主机名

最后,启动snmpd服务:
/etc/init.d/snmpd start

还有就是别忘记了把snmpd设置为开机自启动。
chkconfig snmpd on

  1. No comments yet.
(will not be published)
*