Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7402342
  • 博文数量: 1756
  • 博客积分: 18684
  • 博客等级: 上将
  • 技术积分: 16232
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-02 10:28
个人简介

啥也没写

文章分类

全部博文(1756)

文章存档

2024年(2)

2023年(44)

2022年(39)

2021年(46)

2020年(43)

2019年(27)

2018年(44)

2017年(50)

2016年(47)

2015年(15)

2014年(21)

2013年(43)

2012年(143)

2011年(228)

2010年(263)

2009年(384)

2008年(246)

2007年(30)

2006年(38)

2005年(2)

2004年(1)

分类: LINUX

2008-05-29 17:38:24

1、确保本机已经安装了snmp服务
[root@idc ~]# rpm -qa |grep snmp
net-snmp-libs-5.1.2-11.EL4.7
net-snmp-5.1.2-11.EL4.7
如果没有,那么放入linux安装盘找到snmp的rpm包进行安装,或者到网上搜索适合自己linux发行版本的rpm包进行安装
在新版本的centos及redhat es版本中可能在安装时会提示依赖性错误,这时需要安装lm_sensors-2.8.7-2.40.3.i386.rpm,再安装netsnmp软件。
2、snmpd.conf文件配置
按照如下方式修改snmpd.conf文件
A、修改默认的community string
com2sec notConfigUser default public
将public修改为你才知道的字符串
B、把下面的#号去掉
#view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc
C、把下面的语句
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
完成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
 
 
 
com2sec notConfigUser  default       public
创建一个共同体(public) 及其用户(notconfiguser)
group   notConfigGroup   v1           notConfigUser 
定义一个组名(notConfigGroup)及其安全级别( v1) 和用户(notConfigUser )
view    systemview    included   .1.3.6.1.2.1.1
定义一个可操作的范围(.1.3.6.1.2.1.1)
我这里一般改成
view    all   included   .1
access  notConfigGroup ""      any       noauth    exact  systemview none none
定义组的权限 我改成
access  notConfigGroup ""      any       noauth    exact  all  none none

 
阅读(1737) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~