net-snmp(5.7.2) install and test in linux
来源:互联网 发布:什么是三维编程 编辑:程序博客网 时间:2024/06/05 23:10
2. cd net-snmp-5.7.2
3. ./configure
增加配置项目:
./configure --prefix=/usr/local/net-snmp --enable-mfd-rewrites --with-default-snmp-version="2" --with-sys-contact="Aaron_E_mail:lvsong@yaolan.com" --with-sys-location="China" --with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp"
note:
refix:net-snmp将要安装的路径
enable-mfd-rewrites:允许用新的MFD重写可用的mid模块
with-default-snmp-version:默认的SNMP版本
with-sys-contact:可以配置该设备的联系人
with-sys-location:该设备的位置
with-logfile:日志文件路径
with-persistent-directory:不变数据存储目录如果不添加那么多的参数,就一个prefix的话,后面的参数,在安装过程中都会有提示,所以说那些参数不是现在就必须要写得,ok配置完成后输出如下信息
4. make
error1: /bin/ld: cannot find -lperlfix:
apt-get install libperl-dev
/usr/local/bin# ln -s libperl.so.5.10 libperl.so
5. make install
6. snmptrap failsnmptrap: error while loading shared libraries: libnetsnmp.so.30: cannot open shared object file: No such file or directory
fix:
/usr/local/lib下所有的包都copy到/usr/lib
7. 拷贝配置文件模板,修改后重启snmpd(可kill后重新打开)
将EXAMPLE.conf文件复制到/usr/local/net-snmp/share/snmp/,并重命名为snmpd.conf
[root@localhost net-snmp-5.3.2]# cp EXAMPLE.conf /usr/local/net-snmp/share/snmp/snmpd.conf
修改配置文件将配置文件修改成下面的参数Sec.name是定义的别名,在后面的组中使用,组要用来赋予权限,是只读还是读写,source是允许那个地址来连接你的snmp,我现在写的这个是允许172.21.0.88这个地址来连接,如果你需要使用一个网段的话,那么就可以这么写了172.21.0.0/24,这个看的明白吧,community是共同体的名称,你用client连接snmp使用的,相当于密码
com2sec local localhost COMMUNITY
com2sec mynetwork 172.21.0.88 public
# context sec.model sec.level match read write notif
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all none none
[root@localhost net-snmp-5.3.2]# /usr/local/net-snmp/sbin/snmpd -c /usr/local/net-snmp/share/snmp/snmpd.conf &
9.设置环境变量为了下一步的测试
[root@localhost net-snmp-5.3.2]# PATH=/usr/local/net-snmp/bin:/usr/local/net-snmp/sbin:$PATH
10.测试使用到snmpwalk这个命令
[root@localhost net-snmp-5.3.2]# snmpwalk -v 2c -c public localhost if
如果能看到下面的信息恭喜能,net-snmp安装配置完成,你可以去client使用监控软件开始工作了这里记住了,每次对snmpd.conf文件修改后,如果要生效,必须要杀掉snmp的老进程,在启用新的,要开机自动启动进程,我们可以使用这个在/etc/rc.d/rc.local文件中添加
/usr/local/net-snmp/sbin/snmpd –d 就ok了.
- net-snmp(5.7.2) install and test in linux
- Linux net-snmp-5.7.2安装配置
- Linux net-snmp-5.7.2安装配置
- Install tensorflow and test
- DPDK install and test
- How to Test Private and Protected methods in .NET
- linux net-snmp agent manager windows snmp
- Install Linux Malware Detect (LMD) in RHEL, CentOS and Fedora
- How do I install and use fonts in Linux?
- How to install zip and unzip command in Linux?
- snmp test
- install mysql and gcc in linux as 4.5 use INSTALL-BINARY version
- Install and test nginx on Ubuntu 14.04
- perl DBD Informix install and test
- Linux下安装net snmp
- linux 下安装net snmp
- snmp v3 trap(send and receive use net-snmp)
- net-snmp(5.7.2)移植到arm
- C#3.0新特性(三)- 详说自动属性和匿名类型
- PHP设计完美分页类
- http头中的host字段详解
- u-boot: _start, _armboot_start, .word等概念的理解
- Android屏幕选择
- net-snmp(5.7.2) install and test in linux
- HighCharts 详细使用及API文档说明
- java web 文件文件上传
- perforce 和 svn 的比较
- 在一个Activity里面结束另一个Activity
- android屏幕自适应研究
- USACO4.2.3/job
- ExtJS 常用代码片段
- 【91 阶乘之和 贪心】