cacti被监控机上snmp的安装及报错解决
2012-05-07 17:36
337 查看
如下是我在生产环境部署完cacti后,在被监控端安装snmp的过程记录,因为服务器版本各不相同,32bit和64bit的都有,所以也搜集了各报错信息解决方法如下,也方便以后自己查阅,朋友们如有建议或者哪不合适需修改的地方,欢迎指正.
以下是安装脚本
#!/bin/bash
#wget http://nchc.dl.sourceforge.net/sourceforge/beecrypt/beecrypt-4.1.2.tar.gz
tar -zxf beecrypt-4.1.2.tar.gz
cd beecrypt-4.1.2
./configure --prefix=/usr/
make && make install
ln -s /usr/lib/libelf.so.1 /usr/lib/libelf.so
cd ..
#wget http://sourceforge.net/projects/net-snmp/files/net-snmp/5.3.4/net-snmp-5.3.4.tar.gz
tar -zxf net-snmp-5.3.4.tar.gz
cd net-snmp-5.3.4
./configure --prefix=/usr/local/net-snmp --enable-mfd-rewrites --with-default-snmp-version="2" --with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp"
make && make install
cp EXAMPLE.conf /usr/local/net-snmp/share/snmp/snmpd.conf
sed -i -e '61s/^/#/' -e '62s#\(com2sec[[:blank:]]..*[[:blank:]]\)\S\S*\([[:blank:]]..*\)#\1192.168.1.50 public#' -e '63s/^$/com2sec mynetwork 192.168.1.0\/24 public/' /usr/local/net-snmp/share/snmp/snmpd.conf
#/usr/local/net-snmp/sbin/snmpd -c /usr/local/net-snmp/share/snmp/snmpd.conf
#######-----In the main monitoring terminal testing whether SNMP success-----#######
#/usr/local/net-snmp/bin/snmpwalk -v 1 -c public localhost system
net-snmp编译过程中的Error信息及解决方法
安装版本:
net-snmp-5.3.3.tar.gz
安装过程:
tar -zxvf net-snmp-5.3.3.tar.gz
cd net-snmp-5.3.3
./configure
make
make install
出错信息:
在第四步:make
Grep /usr/lib/libbeecrypt.la: No such file or directory
/bin/sed: can't read /usr/lib/libbeecrypt.la: No such file or directory
libtool: link: `/usr/lib/libbeecrypt.la' is not a valid libtool archive
make[1]: *** [libnetsnmpmibs.la] Error 1
make[1]:Leavingdirectory /email/share/ceno_soft/net-snmp-5.3.3/agent'
make: *** [subdirs] Error 1
提示信息应该是缺少libbeecrypt.la ,libbeecrypt.so等共享库
解决方法:
安装beecrypt
下载:beecrypt-4.1.2.tar.gz
安装:
tar -zxvf beecrypt-4.1.2.tar.gz
./configure -prefix=/usr
make && make install
安装beecrypt后继续安装net-snmp
make
执行后继续报错:
/usr/bin/ld: cannot find –lelf
collect2: ld returned 1 exit status
make[1]: *** [snmpd] Error 1 make[1]: Leaving directory `/local/akazam/cacti/bak/net-snmp-5.3.3/agent'
make: *** [subdirs] Error 1
ke[1]: Leaving directory `/local/akazam/cacti/bak/net-snmp-5.3.3/agent
make: *** [subdirs] Error 1
解决方法:
执行命令:
ln -s /usr/lib/libelf.so.1 /usr/lib/libelf.so
问题解决~
注:在64位机器上编译有时会遇到下面错误:
/usr/lib/libpopt.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make:*** [service:snmpd] Error 1
解决方法:
需要在安装文件中做修改:
agent/Makefile:
LIBS = ../snmplib/libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) -ldl -lrpm -lrpmio -lpopt -lz -lcrypto -lm $(PERLLDOPTS)
改为
LIBS = ../snmplib/libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) -ldl -lrpm -lrpmio /usr/lib64/libpopt.so -lz -lcrypto -lm $(PERLLDOPTS)
apps/Makefile:
TRAPDWITHAGENT = $(USETRAPLIBS) -ldl -lrpm -lrpmio -lpopt -lz -lcrypto -lm
改为
TRAPDWITHAGENT = $(USETRAPLIBS) -ldl -lrpm -lrpmio /usr/lib64/l
ibpopt.so -lz -lcrypto -lm
然后再make && makeinstall
本文出自 “王海鹏” 博客,请务必保留此出处http://wanghaipeng1124.blog.51cto.com/2500801/856172
以下是安装脚本
#!/bin/bash
#wget http://nchc.dl.sourceforge.net/sourceforge/beecrypt/beecrypt-4.1.2.tar.gz
tar -zxf beecrypt-4.1.2.tar.gz
cd beecrypt-4.1.2
./configure --prefix=/usr/
make && make install
ln -s /usr/lib/libelf.so.1 /usr/lib/libelf.so
cd ..
#wget http://sourceforge.net/projects/net-snmp/files/net-snmp/5.3.4/net-snmp-5.3.4.tar.gz
tar -zxf net-snmp-5.3.4.tar.gz
cd net-snmp-5.3.4
./configure --prefix=/usr/local/net-snmp --enable-mfd-rewrites --with-default-snmp-version="2" --with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp"
make && make install
cp EXAMPLE.conf /usr/local/net-snmp/share/snmp/snmpd.conf
sed -i -e '61s/^/#/' -e '62s#\(com2sec[[:blank:]]..*[[:blank:]]\)\S\S*\([[:blank:]]..*\)#\1192.168.1.50 public#' -e '63s/^$/com2sec mynetwork 192.168.1.0\/24 public/' /usr/local/net-snmp/share/snmp/snmpd.conf
#/usr/local/net-snmp/sbin/snmpd -c /usr/local/net-snmp/share/snmp/snmpd.conf
#######-----In the main monitoring terminal testing whether SNMP success-----#######
#/usr/local/net-snmp/bin/snmpwalk -v 1 -c public localhost system
net-snmp编译过程中的Error信息及解决方法
安装版本:
net-snmp-5.3.3.tar.gz
安装过程:
tar -zxvf net-snmp-5.3.3.tar.gz
cd net-snmp-5.3.3
./configure
make
make install
出错信息:
在第四步:make
Grep /usr/lib/libbeecrypt.la: No such file or directory
/bin/sed: can't read /usr/lib/libbeecrypt.la: No such file or directory
libtool: link: `/usr/lib/libbeecrypt.la' is not a valid libtool archive
make[1]: *** [libnetsnmpmibs.la] Error 1
make[1]:Leavingdirectory /email/share/ceno_soft/net-snmp-5.3.3/agent'
make: *** [subdirs] Error 1
提示信息应该是缺少libbeecrypt.la ,libbeecrypt.so等共享库
解决方法:
安装beecrypt
下载:beecrypt-4.1.2.tar.gz
安装:
tar -zxvf beecrypt-4.1.2.tar.gz
./configure -prefix=/usr
make && make install
安装beecrypt后继续安装net-snmp
make
执行后继续报错:
/usr/bin/ld: cannot find –lelf
collect2: ld returned 1 exit status
make[1]: *** [snmpd] Error 1 make[1]: Leaving directory `/local/akazam/cacti/bak/net-snmp-5.3.3/agent'
make: *** [subdirs] Error 1
ke[1]: Leaving directory `/local/akazam/cacti/bak/net-snmp-5.3.3/agent
make: *** [subdirs] Error 1
解决方法:
执行命令:
ln -s /usr/lib/libelf.so.1 /usr/lib/libelf.so
问题解决~
注:在64位机器上编译有时会遇到下面错误:
/usr/lib/libpopt.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make:*** [service:snmpd] Error 1
解决方法:
需要在安装文件中做修改:
agent/Makefile:
LIBS = ../snmplib/libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) -ldl -lrpm -lrpmio -lpopt -lz -lcrypto -lm $(PERLLDOPTS)
改为
LIBS = ../snmplib/libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) -ldl -lrpm -lrpmio /usr/lib64/libpopt.so -lz -lcrypto -lm $(PERLLDOPTS)
apps/Makefile:
TRAPDWITHAGENT = $(USETRAPLIBS) -ldl -lrpm -lrpmio -lpopt -lz -lcrypto -lm
改为
TRAPDWITHAGENT = $(USETRAPLIBS) -ldl -lrpm -lrpmio /usr/lib64/l
ibpopt.so -lz -lcrypto -lm
然后再make && makeinstall
本文出自 “王海鹏” 博客,请务必保留此出处http://wanghaipeng1124.blog.51cto.com/2500801/856172
相关文章推荐
- 安装cacti过程中的各种报错以及解决方法
- PHP安装ionCube插件报错The Loader must appear as the first entry in the php.ini file in Unknown的解决方法
- windows下安装tensorflow报错解决办法
- [异常解决] Keil安装好nRF51822开发环境,运行DEMO报错:Error:“GPIOTE_CONFIG_NUM_OF_LOW_POWER_ENVENTS” is undefined
- [Linux-Tech]解决xen安装时python-central报错
- 解决Mac的virtual box安装centos7的报错问题
- 解决12c安装过程中的各种报错
- 解决安装windows7或windows 8过程中缺少CD/DVD驱动的报错问题
- ubuntu10.04上安装 ibus Google拼音输入法,包括报错CMake Error: your CXX compiler的解决方法
- redhat6.5安装cacti监控及安装过程中的问题解决
- Cacti安装错误:Warning: exec(): Unable to fork [c:/rrdtool/rrdtool.exe] 已解决
- 解决cacti通过ucd/net snmp不能获取硬盘分区问题
- ubuntu安装jdk之后,报错java/lang/NoClassDefFoundError: java/lang/Object的解决办法
- sqlserver 安装“ 0x8 ”系列报错解决
- linux_cacti 配置之 安装snmp 服务
- 安装Project 2010 报错1406的解决办法
- CentOS6.5下安装Hive2.0.0详解及其报错解决办法
- [Python]Python3.3 xlwt3 安装及使用报错解决办法汇总
- cacti安装spine 解决WARNING: Result from CMD not valid. Partial Result: U错误
- cacti-spine安装报错解决