本文参考地址:http://blog.163.com/qiushuhui1989@126/blog/static/270110892014119113421364/
1. 源码下载
# wget http://download.cloud.360.cn/yjk/net-snmp.tar.gz
2. 解压
# tar xzvf net-snmp.tar.gz
3. 初始化(指定的默认的安装目录是/usr/local/snmp)
# cd net-snmp-5.7.2 # ./configure --prefix=/usr/local/snmp --with-mib-modules=ucd-snmp/diskio -enable-mfd-rewrites
这时候我遇到一个问题:
BEGIN failed--compilation aborted at Makefile.PL line 1. make: *** [perlmakefiles] Error 2
经过goole搜索,查找到解决方案,顺便推荐一个谷歌镜像地址:(http://www.googto.com):
# yum install cpan -y
4. 编译和安装
make && make install
5. 启动脚本 (可执行下面命令启动snmpd服务)
# /usr/local/snmp/sbin/snmpd