linux下安装及配置snmp服务

上一篇 / 下一篇  2008-11-24 17:50:14 / 个人分类:Linux/Unix

1 下载net-snmp -5.3.0.1.tar.gz包,编译并安装

2 修改snmpd.conf文件配置
按照如下方式修改snmpd.conf文件
(1)修改默认的community string
    com2sec notConfigUser default public
    将public修改为你才知道的字符串
(2)把下面的#号去掉
    #view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
(3)把下面的语句
    access notConfigGroup “” any noauth exact systemview none none
    改成:
    access notConfigGroup “” any noauth exact mib2 none none


3、重启snmpd服务
   #/etc/rc.d/init.d/snmpd restart 或   #service snmpd restart


   完成snmpd的配置


4、确保linux的iptables防火墙对我们的流量监控服务器开放了udp 161端口的访问权限
   可使用iptables –L –n 查看当前iptables规则
   可编辑/etc/sysconfig/iptables文件来修改iptables规则。
   把snmpd服务添加为自启动   #chkconfig snmpd on
   可以用chkconfig –list |grep on 来查看是否已经是自启组
   如果chkconfig –list |grep snmpd 没有的话可以先用以下命令增加
   #chkconfig –add snmpd


TAG: Linux

 

评分:0

我来说两句

Open Toolbar