ubuntu搭建mib2c环境

时间:2022-12-19 23:32:41

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. Spring、hibernate以及struts2三大框架的整合

    1.首先导入整合框架所需要的43个jar包: 2.配置xml文件: <?xml version="1.0" encoding="UTF-8"?> & ...

  2. store前台数据过滤

    最近由于客户需要对grid进行大量的检索操作,而现有的grid数据是以分页的形式从数据库端获取,每次检索都需要重新进行获取,效率很低. 因而将数据进行一次加载,每次的检索操作在前台extjs进行过滤, ...

  3. 织梦DedeCMS"当前位置"去除最后一个 &gt&semi; 符号的方法

    首先找到根目录下面的include 目录,然后找到 typelink.class.php 文件, 再查找到 GetPositionLink 方法 下面的 return $this->valueP ...

  4. C&plus;&plus;异常处理(Exception Handling)

    在C++中引入了三种操作符来处理程序的出错情况,分别是:try  , throw  ,  catch 1.基本的用法如下: try{ //code to be tried throw exceptio ...

  5. 【转】Linux命令之查看文件占用空间大小-du&comma;df

    原文网址:http://blog.csdn.net/wangjunjun2008/article/details/19840671 du(disk usage),顾名思义,查看目录/文件占用空间大小 ...

  6. Rails当你运行一个数据库回滚错误:ActiveRecord&colon;&colon;IrreversibleMigration exception

    最近rails3.2在更改数据库表字段,然后要回滚取消,但在运行rake db:rollback命令,错误: rake aborted! An error has occurred, all late ...

  7. 2018-2019-2-20175332-实验二《Java面向对象程序设计》实验报告

    一.单元测试 实验要求:参考 http://www.cnblogs.com/rocedu/p/6371315.html#SECUNITTEST 完成单元测试的学习 提交最后三个JUnit测试用例(正常 ...

  8. 【转】Entity Framework Extended Library (EF扩展类库,支持批量更新、删除、合并多个查询等)

    E文好的可以直接看https://github.com/loresoft/EntityFramework.Extended 也可以在nuget上直接安装这个包,它的说明有点过时了,最新版本已经改用对I ...

  9. CSS 预处理器

    在程序员眼里,css不像其他程序语言(例如PHP, Javascript等等),有自己的变量.常量.条件语句以及一些编程语法,它只是一行行单纯的属性描述,写起来相当费事,而且代码难以组织和维护.自然的 ...

  10. PHP数组转对象,对象转数组

    废话不多,直接上代码: <?php class object_array{ //数组转对象 public static function array_to_object($e){ if(gett ...