net-snmp
下载地址:http://ncu.dl.sourceforge.net/project/net-snmp/net-snmp/5.4.2.1/net-snmp-5.4.2.1.tar.gz
解压然后编译,编译参数
如编译报错:
这是缺少libperl-dev开发库,安装上
然后make ;make install
可以用snmpconf配置snmpd.conf,也可用例子文件
然后根据需要修改此文件
启动
测试
---------END------------
下载地址:http://ncu.dl.sourceforge.net/project/net-snmp/net-snmp/5.4.2.1/net-snmp-5.4.2.1.tar.gz
解压然后编译,编译参数
./configure --prefix=/usr/local/net-snmp/ --with-sys-contact="askwan@askwan.com" --with-sys-location="pudong shanghai China" --enable-shared --with-default-snmp-version=2 --enable-mfd-rewrites --with-mib-modules="misc/ipfwacc mibII host disman/event-mib ucd_snmp agent_mibs agentx notification target utilities ucd-snmp/diskio tunnel mibII/mta_sendmail" --with-sysconfdir="/usr/local/net-snmp/etc/"
如编译报错:
Quotation
/usr/bin/ld: cannot find -lperl
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
这是缺少libperl-dev开发库,安装上
apt-get install libperl-dev
然后make ;make install
可以用snmpconf配置snmpd.conf,也可用例子文件
cp EXAMPLE.conf /usr/local/net-snmp/etc/snmpd.conf
然后根据需要修改此文件
com2sec local localhost askwan
com2sec mynetwork 192.168.0.0/24 askwan
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
view all included .1 80
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
syslocation shanghai pu dong
syscontact Me askwan@askwan.com
com2sec mynetwork 192.168.0.0/24 askwan
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork
group MyROGroup usm mynetwork
view all included .1 80
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
syslocation shanghai pu dong
syscontact Me askwan@askwan.com
启动
/usr/local/net-snmp/sbin/snmpd -Lsd -Lf /dev/null -p /var/run/snmpd.pid -a -c /usr/local/net-snmp/etc/snmpd.conf
测试
snmpwalk -c askwan -v2c 192.168.0.5 if
Quotation
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
....
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
....
---------END------------
作者:askwan@『AskWan』
地址:http://www.askwan.com/debian_net-snmp_compile/
可以转载,转载时请以链接形式注明作者和原始出处及本声明!
oracle temporary tablespace boom unexpectedly
A friend company's Linux server ext3 filesystem becomes read only

2009/09/23 16:16 | by











