一、下载net-snmp源码包
netsnmp的源码包可以到 net-snmp官网上去下载,http://www.net-snmp.org。
二、解压net-snmp源码包
把下载好的压缩包net-snmp-5.7.3.tar.gz拷贝到linux系统中并解压。
[root@localhost jiangxin]# tar -zxvf net-snmp-5.7.3.tar.gz
三、配置net-snmp
进入解压的 net-snmp-5.7.3文件夹。可以看到configure文件,现在就使用这个文件来自动配置。
当然,自动配置也可以定制一些内容,比如安装路径等。
./configure参数 含义
--prefix=/usr/local/net-snmp net snmp的安装路径
--enable-mfd-rewrites 允许新的mfd重写可用的mid模块
--with-default-snmp-version="3" 默认的snmp版本
--with-sys-contact="name,E_mail:maileaddress " 该设备的联系人
--with-sys-location="China" 该设备的位置
--with-logfile="/var/log/snmpd.log" 日志文件路径