从以下地址可以下载到最新的软件安装包:
http://nchc.dl.sourceforge.net/sourceforge/net-snmp/net-snmp-5.4.2.1.tar.gz
1、解压源码包:
tar –zxvf net-snmp-5.4.2.1.tar.gz
2、进入解压后的文件目录:
cd net-snmp-5.4.2.1
Systemcontact information(配置该设备的联系信息): heaven(也可以是邮箱地址)
System location (该系统设备的地理位置):BEIJING P.R China
Location to write logfile (日志文件位置): /var/log/snmpd.log
Location to Write persistent(数据存储目录): /var/net-snmp
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure.sh:error:no acceptable C compiler found in $PATH
See 'config.log' for more details.
编 译源码包文件,通常只需要执行make命令
5、
cp EXAMPLE.conf /etc/snmp/snmpd.conf //cp样例配置到安装目录下
把里面的mynetwork改成需要查看snmp信息的主机ip 地址
把COMMUNITY改成你设定的值(自己起个字符串形式的名字)。
然后保存退出
7、/usr/local/sbin/snmpd –c /etc/snmp/snmpd.conf & //启动snmp
8、netstat -an //查看snmp是否启动
在正确配置以后如果发现ping通,但是snmp监控的设备报错的话