net-snmp安装手记

Installing /usr/share/man/man3/NetSNMP::agent.3pm
Installing /usr/share/man/man3/NetSNMP::OID.3pm
Installing /usr/share/man/man3/NetSNMP::agent::default_store.3pm
Installing /usr/share/man/man3/SNMP.3
Installing /usr/share/man/man3/NetSNMP::netsnmp_request_infoPtr.3pm
Installing /usr/share/man/man3/NetSNMP::default_store.3pm
Installing /usr/share/man/man3/NetSNMP::ASN.3pm
Installing /usr/share/man/man3/NetSNMP::TrapReceiver.3pm
Writing /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Bundle/NetSNMP/.packlist
Appending installation info to /usr/lib/perl5/5.8.5/i386-linux-thread-multi/perllocal.pod
make[1]: Leaving directory `/root/net-snmp-5.4.1/perl'




[root@cgeek ~]# rpm -vih elfutils-devel-0.96-1.i386.rpm
warning: elfutils-devel-0.96-1.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
error: Failed dependencies:
        elfutils-libelf-devel = 0.96-1 is needed by elfutils-devel-0.96-1.i386
[root@cgeek ~]# rpm -qa |grep elfutils
elfutils-libelf-0.96-1
elfutils-0.96-1
[root@cgeek ~]# rpm -vih elfutils-libelf-devel-0.96-1.i386.rpm
warning: elfutils-libelf-devel-0.96-1.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing...                ########################################### [100%]
   1:elfutils-libelf-devel ########################################### [100%]
[root@cgeek ~]# rpm -vih elfutils-devel-0.96-1.i386.rpm
warning: elfutils-devel-0.96-1.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
Preparing...                ########################################### [100%]
   1:elfutils-devel         ########################################### [100%]



[root@cgeek ~]# /etc/rc.d/init.d/snmpd start
启动 snmpd:                                               [ 确定 ]



http://blog.chinaunix.net/u2/62377/showart_490549.html

一.环境
OS:RHEL AS4
net-snmp version:5.3.2
二.步骤
1.用root帐户登录
2.运行snmpwalk和snmpget命令,看是否已经安装snmp,如果已经安装就没必要再安装了;-)
3.将net-snmp-5.3.2.tar.gz解压(tar -zxvf net-snmp-5.3.2.tar.gz)
4.进入net-snmp-5.3.2目录
5.运行./configure,根据提示输入相应信息
6.运行make
7.运行make install
8.安装完毕
三.可能遇到的问题
1.找不到libbeecrypt.la,在make时可能出现如下error

libtool: link: cannot find the library `/usr/lib/libbeecrypt.la' (librpmio.la: /usr/lib/libbeecrypt.la)

make[1]: *** [snmpd] Error 1

make[1]: Leaving directory `/home/xxx/net-snmp-5.3.2/agent'

make: *** [subdirs] Error 1

解决办法:
http://sourceforge.net/projects/beecrypt 下载beecrypt-4.1.2.tar.gz
然后运行如下命令:
#tar -zxvf beecrypt-4.1.2.tar.gz
#./configure -prefix=/usr(默认是安装在/usr/local,我们需要安装在/usr目录下)
#make
#make install
2./usr/bin/ld: cannot find -lelf,在make时可能出现如下error

/usr/bin/ld: cannot find -lelf

collect2: ld returned 1 exit status

make[1]: *** [snmpd] Error 1

make[1]: Leaving directory `/home/xxx/net-snmp-5.3.2/agent'

make: *** [subdirs] Error 1

解决办法:
#ln -s libelf.so.1 /usr/lib/libelf.so
3.我在安装的过程中没有碰到这个问题,在此作为参考
echo /usr/local/lib >/etc/ld.so.conf.d/libnetsnmp.conf
#/sbin/ldconfig -v
#make install
文件: net-snmp-5.3.2.tar.gz
大小: 4219KB
下载: 下载

文件: beecrypt-4.1.2.tar.gz
大小: 756KB
下载: 下载

你可能感兴趣的:(转载文章)