1.下载net-snmp
http://net-snmp.sourceforge.net/download.html
例如,下载5.5版本
2.进入下载目录,解压net-snmp压缩包
#tar zxf net-snmp-5.5.tar.gz
3.configure
#cd net-snmp-5.5
#./configure --with-default-snmp-version="2" --with-sys-contact="contact@contact" --with-sys-location="location" --with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp"
4.make
# make
# make install
5.配置conf文件
# vi /etc/snmpd.conf
在 snmpd.conf 中輸入一行:
rocommunity public
:wq 保存并退出
6.启动
# snmpd -C -c /etc/snmpd.conf
7.检验mib2c
# mib2c
如果出现以下:
Use of uninitialized value $key in hash element at /usr/local/lib/perl/5.10.1/SNMP.pm line 1325.
Use of uninitialized value $key in hash element at /usr/local/lib/perl/5.10.1/SNMP.pm line 1326.
Use of uninitialized value in null operation at /usr/local/lib/perl/5.10.1/SNMP.pm line 1325.
You didn't give mib2c a valid OID to start with.  IE, I could not find
any information about the mib node "".  This could be caused
because you supplied an incorrectly node, or by the MIB that you're
trying to generate code from isn't loaded.  To make sure your mib is
loaded, run mib2c using this as an example:
   env MIBS="+MY-PERSONAL-MIB" mib2c
You might wish to start by reading the MIB loading tutorial at:
   http://www.net-snmp.org/tutorial-5/commands/mib-options.html
And making sure you can get snmptranslate to display information about
your MIB node.  Once snmptranslate works, then come back and try mib2c
again.
证明可用,搭建完成。

最新文章

  1. HibernateUtil.java
  2. mvc 学习(一)
  3. react.js 多个组件集成示例
  4. javascript实现有向无环图中任意两点最短路径的dijistra算法
  5. Android AlarmManager类的应用(实现闹钟功能)
  6. 从Uboot到Linux技术内幕
  7. 几条特殊的SQL语句
  8. angular下H5上传图片(可多张上传)
  9. burp
  10. java随机数与数组的使用。
  11. 【原创】构建高性能ASP.NET站点 第五章—性能调优综述(后篇)
  12. ubuntu 设置主屏和副屏
  13. [蓝桥杯]2014蓝桥省赛B组题目及详解
  14. flask session
  15. 初识Vue,简单的todolist
  16. <亲测>用navicat连接mysql 8.0 报错2059
  17. MRO + super面试题(详解)
  18. P2429 制杖题
  19. e780. 设置JList中的已选项
  20. wpgcms---单片页数据渲染

热门文章

  1. 自己实现strcpy函数
  2. 锂电池电流单位C5A
  3. hdu5673 Robot 卡特兰数+组合数学+线性筛逆元
  4. JavaScript-4.5 事件大全,事件监听---ShinePans
  5. 【转】 在Eclipse中使用JUnit4进行单元测试(中级篇)
  6. 离散数学及其应用(Discrete Mathematica With Application 7th)学习笔记 第一章
  7. python 使用正则表达式的爬虫
  8. jQuery实现3D幻灯片
  9. @Resource 注解
  10. 哈工大LTP