1 安装SNMP
#yum install net-snmp #yum install net-snmp-utils #vi /etc/rc.local 添加一行:service snmpd start 设置开机自动运行 # chkconfig snmpd on
2 配置SNMP
修改 snmp 配置文件 #vi /etc/snmp/snmpd.conf 查找 com2sec notConfigUser default public 将团体名 public 改为其它任意字段,例: com2sec notConfigUser default qishi 查找 access notConfigGroup “” any noauth exact systemview none none 将 read 权限 systemview 改为 all,例: access notConfigGroup “” any noauth exact all none none 查找 #view all included .1 80 去掉#view all 前面的#,例: view all included .1 80 退出后重启 snmp #/etc/init.d/snmpd restart
3 添加防火墙策略
修改 防火墙配置文件 #vi /etc/sysconfig/iptables -A RH-Firewall-1-INPUT -p udp -m state –state NEW -m udp –dport 161 -j ACCEPT 重启 Iptables #/etc/init.d/iptables restart