netsnmp安装包版本:net-snmp-5.7.3.tar
安装环境:CentOS7
脚本内容如下:
#!/bin/bash
#current path
Spath=`pwd`
#netsnmp install path
path=/usr/local/snmp
echo start decompressing file ....
tar -xvf ./net-snmp-* -C /home
#unzip ./net-snmp-*
echo decompress finished !!!
echo start configure ....
cd /home/net-snmp-5.7.3
chmod 777 configure
./configure --prefix='/usr/local/snmp' --with-default-snmp-version='3' --with-sys-contact='name,E_mail:mailaddress' --with-sys-location='China' --with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp"
sleep 3
echo start install netsnmp......
make
sleep 3
make install