Step 1 检查系统版本
[iyunv@client ~]# cat /etc/redhat-release CentOS release 5.6 (Final)
Step 2 安装软件包 net-snmp net-snmp-devel
[iyunv@client ~]# yum -y install net-snmpnet-snmp-devel net-snmp-utils
Step 3 修改配置文件 /etc/snmp/snmpd.conf ,找到 /com2sec 这一行
com2sec notConfigUserdefault public
改为 ( 监控主机IP地址 )
com2sec notConfigUser 192.168.10.129 public
access notConfigGroup"" any noauth exact systemview none none
改为
access notConfigGroup "" any noauth exact allnone none
#view all included.1 80
将#注释拿掉
view all included.1 80
保存文件。
Step 4 重启服务,检查配置是否成功:
[iyunv@client ~]# service snmpd start Starting snmpd: [ OK ] [iyunv@client ~]# chkconfig snmpd on [iyunv@client ~]#snmpwalk -c public -v2c 192.168.10.129 [iyunv@client ~]# snmpwalk -v 1 -c public192.168.10.129 IP-MIB:ipAdEntIfIndex IP-MIB::ipAdEntIfIndex.127.0.0.1 = INTEGER:1 IP-MIB::ipAdEntIfIndex.192.168.10.129 =INTEGER: 2
得到以上信息,可以确定你的Linux 下snmp 已配置完成。
|