技术交流QQ群:①185473046   ②190706903   ③203744115   网站地图
登录

下次自动登录
现在的位置: 首页Ubuntu>正文
Ubuntu Server 11.10安装snmp
2012年05月09日 Ubuntu 评论数 2 ⁄ 被围观 12,381次+

操作系统:Ubuntu Server 11.10

1、安装配置snmp

apt-get install snmp snmpd   #安装,根据提示输入y即可

mv /etc/snmp/snmpd.conf  /etc/snmp/snmpd.confbak  #备份原有配置文件

nano /etc/snmp/snmpd.conf  #新建配置文件,添加以下内容

com2sec notConfigUser default public
       group notConfigGroup v1 notConfigUser
       group notConfigGroup v2c notConfigUser
       view systemview included .1
       access notConfigGroup "" any noauth exact systemview none none
       syslocation www.osyunwei.com
       syscontact Root osyunwei@osyunwei.com
       pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat

Ctrl+o  #保存
       Ctrl+x  #退出

系统运维 www.osyunwei.com 温馨提醒:qihang01原创内容©版权所有,转载请注明出处及原文链接

/etc/init.d/snmpd start  #启动
      /etc/init.d/snmpd stop   #停止
      /etc/init.d/snmpd start  #重启
      chkconfig snmpd on  #设置开机启动

2、测试snmp
       netstat -nlup | grep ":161"  #检查snmp服务是否已在运行,出现类似下面的内容,说明snmp运行正常
       udp        0      0 0.0.0.0:161             0.0.0.0:*                           4999/snmpd
       lsof -i:161  #检查snmp端口是否监听,出现下面的内容,说明snmp端口监听正确
       snmpd   4999 snmp    7u  IPv4  17222      0t0  UDP *:snmp
       snmpwalk -v 2c -c public localhost  #有数据输出说明配置正确
       snmpwalk -v 2c -c public 192.168.21.168 #有数据输出说明配置正确

至此,Ubuntu Server 11.10安装snmp完成

     
» 转载请注明来源:系统运维 » Ubuntu Server 11.10安装snmp

  系统运维技术交流QQ群:①185473046 系统运维技术交流□Ⅰ ②190706903 系统运维技术交流™Ⅱ ③203744115 系统运维技术交流™Ⅲ

目前有 2 条留言 其中:访客:2 条, 博主:0 条

  1. hed236 : 2012年05月25日22:52:16  1楼

    文章很详细。。感谢分享

  2. Crow : 2013年02月25日13:31:01  2楼

    Mark 收藏 要是能附上配置文件详解更好了

给我留言

您必须 [ 登录 ] 才能发表留言!



Copyright© 2011-2024 系统运维 All rights reserved
版权声明:本站所有文章均为作者原创内容,如需转载,请注明出处及原文链接
陕ICP备11001040号-3