一、Linux(RedHat)的配置
打开默认的/etc/snmp/snmpd.conf文件,更改如下配置:
1、查找以下字段:
将"comunity"字段改为你要设置的密码.比如"public".
将“default”改为你想哪台机器可以看到你的snmp信息,如172.16.30.155
将"read"字段改为all.
3、查找以下字段:
将该行前面的"#"去掉.
保存关闭.
4、运行/etc/init.d/snmpd start命令运行snmpd.
最后运行netstat -ln查看161端口是否打开了.
打开默认的/etc/snmp/snmpd.conf文件,更改如下配置:
1、查找以下字段:
[Copy to clipboard] [ - ]
CODE:# sec.name source community
com2sec notConfigUser default public
com2sec notConfigUser default public
将"comunity"字段改为你要设置的密码.比如"public".
将“default”改为你想哪台机器可以看到你的snmp信息,如172.16.30.155
将“default”改为你想哪個網段机器可以看到你的snmp信息,如172.16.30.0/24
2、查找以下字段:
2、查找以下字段:
[Copy to clipboard] [ - ]
CODE:####
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write notif
access notConfigGroup "" any noauth exact all none none
# Finally, grant the group read-only access to the systemview view.
# group context sec.model sec.level prefix read write notif
access notConfigGroup "" any noauth exact all none none
将"read"字段改为all.
[Copy to clipboard] [ - ]
CODE:#access notConfigGroup "" any noauth exact systemview none none
3、查找以下字段:
[Copy to clipboard] [ - ]
CODE:## incl/excl subtree mask
#view all included .1 80
#view all included .1 80
将该行前面的"#"去掉.
保存关闭.
4、运行/etc/init.d/snmpd start命令运行snmpd.
最后运行netstat -ln查看161端口是否打开了.
轉載於[url]http://bbs.chinaunix.net/viewthread.php?tid=594019[/url]
转载于:https://blog.51cto.com/gzmaster/75300