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.
证明可用,搭建完成。

ubuntu搭建mib2c环境的更多相关文章

  1. linux -- ubuntu搭建nodejs环境

    需求:在web端做一个实时性功能比较强的模块, 客户端:用websocket 服务端:node.js node.js介绍:node.js天生就是一个高效的服务端语言,可以直接使用 javascript ...

  2. Ubuntu搭建docker环境

    一丶自己搭建Ubuntu的虚拟机(网上很多教程) PS:下带图形化界面的Ubuntu镜像,这里只说一下要装那些工具和做那些配置   安装vim         sudo apt-get install ...

  3. Ubuntu 搭建NDK环境

    一. NDK下载地址 https://developer.android.com/tools/sdk/ndk/index.html 二. NDK环境两种方式 NDK下载后,解压缩后放置于目录/home ...

  4. ubuntu 搭建django 环境

    ubuntu 默认安装了 python2.7 . 安装django apt install python-django: 安装mysql apt install mysql-server*  *代表版 ...

  5. ubuntu搭建开发环境踩坑实录

    谨以此文,记录和ubuntu系统不死不休的搏斗过程,后续待补. 1.双系统安装,windows采用uefi模式安装(优启通可制作uefi的win10安装盘),ubuntu不要划分boot区,而应该划分 ...

  6. Ubuntu搭建lnmp环境

    1.安装nginx 安装 sudo apt-get install nginx 服务启动.停止.重启 /etc/init.d/nginx start /usr/sbin/nginx -c /etc/n ...

  7. ubuntu 搭建开发环境

    一. 安装C/C++程序的开发环境 1. sudo apt-get install build-essential //安装主要编译工具 gcc, g++, make 2. sudo apt-get ...

  8. ubuntu搭建tiny4412环境【学习笔记】

    一.安装完系统之后需要执行如下步骤 1.sudo apt-get update 更新软件源 2.sudo apt-get install vsftpd openssh-server nfs-kerne ...

  9. VirtualBox安装Ubuntu搭建js环境的注意事项

    1.使用CPU-Z工具检查主板是否支持虚拟技术,因为VirtulBox虚拟机需要主板支持虚拟技术 2.Ubuntu安装之后重启会出现:please remove this install medium ...

随机推荐

  1. Android 仿今日头条频道管理(上)(GridView之间Item的移动和拖拽)

    前言 常常逛今日头条.发现它的频道管理功能做的特别赞.交互体验很好.如图: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fo ...

  2. java gc日志详解

    从 Full GC 信息可知,新生代可用的内存大小约为 18M,则新生代实际分配得到的内存空间约为 20M(为什么是 20M? 请继续看下面...).老年代分得的内存大小约为 42M,堆的可用内存的大 ...

  3. linux前后台任务切换管理

    liuyuan@ebuinfo:/var/www/projects/PHPExcel/Examples$ vi 33chartcreate-line.php & [] liuyuan@ebui ...

  4. Vsphere日记01.ESXi5.5.install

    Vsphere ESXi 5.5 install ESXI 5.5 安装环境需求 1.CPU需求 1.1)Interl CPU 必须支持VT-X技术,且在BIOS中开启.I 系列CPU.exon 系列 ...

  5. MD5摘要(Java实现)

    消息摘要算法又成散列算法,其核心在于散列函数的单向性.即通过散列函数可获得对应的散列值,但不可以通过散列值反推其原始信息.   消息摘要算法分为以下三大类:       MD(Message Dige ...

  6. Servlet Session 跟踪

    HTTP 是一种"无状态"协议,这意味着每次客户端检索网页时,客户端打开一个单独的连接到 Web 服务器,服务器会自动不保留之前客户端请求的任何记录. 但是仍然有以下三种方式来维持 ...

  7. flex datagrid itemrender wordwrap失效

    现在我是想把datagrid中的部分字体变个颜色. 但是重写set data函数后发现原先的wordwrap自动换行不好使了. 于是就在谷歌上找问题.. 参考了两篇: http://stackover ...

  8. redhat6.5安装postgresql8.4数据库

    Redhat6.5安装postgresql8.4数据库 step1 先移除原有的postgresql数据库(如果有),否则直接跳过 rpm -qa | grep postgresql* rpm -ev ...

  9. SlidingMenu——使用前的配置

    一: 首先下载lib:SlidingMenu.然后将起导入eclipse中,然后将其clean一下,重新生成R文件. 二: 因为SlidingMenu依赖ActionBarSherlock,所以需要下 ...

  10. 傅里叶叠层成像FP(Fourier Ptychographic Imaging)查资料

    傅里叶叠层成像FP(Fourier Ptychographic Imaging) 傅里叶叠层显微术(FPM)是一种新型的计算显微成像技术,FPM与传统显微术照明方式不同,常采用可编程LED阵列进行不同 ...