您的位置:首页 > 其它

net-snmp-5.7.1 编译安装 (ubuntu)

2012-09-15 21:26 609 查看
下载net-snmp
#wget http://superb-dca2.dl.sourceforge.net/project/net-snmp/net-snmp/5.7.1/net-snmp-5.7.1.tar.gz 安装Ubuntu下的snmp的依赖包
#sudo apt-get install libperl-dev
进入到解压目录,开始配置snmp
#tar -xvf net-snmp-5.7.1.tar.gz
#./configure --with-default-snmp-version="2" --with-sys-contact="@jiesai" --with-sys-location="Unknown" --with-logfile="/var/log/snmpd.log" --with-persistent-directory="/var/net-snmp"
#make
#make install
7、验证安装是否成功,如下所示:
# snmpget --version
如果提示如下错误:
snmpget: error while loading shared libraries: libnetsnmp.so.30: cannot open shared object file: No such file or directory
解决方案如下: cp /usr/local/lib/libnetsnmp.so.30 /usr/lib
#修改snmpd.conf文件 0.0.0.0 是别的机器通过snmp能够信息
agentAddress udp:0.0.0.0:161
view systemonly included .1
com2sec notConfigUser default public
group notConfigGroup v1 notConfigUser
group notConfigGroup v2c notConfigUser
access notConfigGroup "" any noauth exact systemview none none
syslocation www.openlab.com //系统的location
syscontact xxxx(xxxx@qq.com) //系统联系人
dontLogTCPWrappersConnects yes
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: