netsnmp 安装与配置
来源:互联网 发布:个股深港通数据 编辑:程序博客网 时间:2024/05/22 13:14
net-snmp installation and configuration
Recently I spent much time to learn SNMP to try to setup a snmp server for the developers. The following is the steps of installation and configuration of net-snmp, a popular and open source snmp server and agent .
http://www.myfaq.com.cn/2005September/2005-09-13/208338.html
DOWNLOAD AND INSTALL
1.download the source.
http://sourceforge.net/projects/net-snmp
or the official web: http://www.net-snmp.org/
2.Extract the packet.
tar -zxvf net-snmp-5.4.tar.gz
3.Compile the packet.
cd net-snmp-5.4
./configure (for example ./configure --with-mib-modules="agentx")
make
make test
make install
4.Copy the example configure file
cp EXAMPLE.conf /usr/local/share/snmp/snmpd.conf
5.Modify the configure file as following
Change the COMMUNITY to democommunity which is a community string
6.check the process of snmpd and kill it and then run it
ps -A | grep snmp kill xxxx snmpd -d -L
7.have a try.
snmpget -v 1 -c democommunity localhost system.sysUpTime.0
INSTALL A MIB
1. A mibs file like JM-TEST-1-MIB.txt. the following is the content.
2.Copy the mib file to the correct locations
cp JM-TEST-1-MIB.txt /usr/local/share/snmp/mibs
3.Let the snmp tools to recognize the mibs
echo "mibs +JM-TEST-1-MIB" >> /usr/local/share/snmp/snmp.conf
4.Use the snmptranslate to verify if the mib is loaded.
snmptranslate -IR -Tp experimental
and should get the following show:
Unlinked OID in JM-TEST-1-MIB: jmtest ::= { experimental 72 }
+--experimental(3)
|
+--jmtest(72)
+-- -RW- INTEGER firstKey(1)
Range: 0..100
http://www.myfaq.com.cn/2005September/2005-09-13/208338.html
DOWNLOAD AND INSTALL
1.download the source.
http://sourceforge.net/projects/net-snmp
or the official web: http://www.net-snmp.org/
2.Extract the packet.
tar -zxvf net-snmp-5.4.tar.gz
3.Compile the packet.
cd net-snmp-5.4
./configure (for example ./configure --with-mib-modules="agentx")
make
make test
make install
4.Copy the example configure file
cp EXAMPLE.conf /usr/local/share/snmp/snmpd.conf
5.Modify the configure file as following
Change the COMMUNITY to democommunity which is a community string
6.check the process of snmpd and kill it and then run it
ps -A | grep snmp kill xxxx snmpd -d -L
7.have a try.
snmpget -v 1 -c democommunity localhost system.sysUpTime.0
INSTALL A MIB
1. A mibs file like JM-TEST-1-MIB.txt. the following is the content.
JM-TEST-1-MIB DEFINITIONS ::= BEGINIMPORTS MODULE-IDENTITY, OBJECT-TYPE, INTEGER FROM SNMPv2-SMI;jmtest MODULE-IDENTITY LAST-UPDATED "200203210000Z" ORGANIZATION "Temple U" CONTACT-INFO "None yet." DESCRIPTION "AgentX testing MIB" REVISION "200203210000Z" DESCRIPTION "None yet." ::= { experimental 72}firstKey OBJECT-TYPE SYNTAX INTEGER (0..100) MAX-ACCESS read-write STATUS current DESCRIPTION "Value initialized to 0 and on each access: - Return current val. - increment" ::= { jmtest 1 }END
2.Copy the mib file to the correct locations
cp JM-TEST-1-MIB.txt /usr/local/share/snmp/mibs
3.Let the snmp tools to recognize the mibs
echo "mibs +JM-TEST-1-MIB" >> /usr/local/share/snmp/snmp.conf
4.Use the snmptranslate to verify if the mib is loaded.
snmptranslate -IR -Tp experimental
and should get the following show:
Unlinked OID in JM-TEST-1-MIB: jmtest ::= { experimental 72 }
+--experimental(3)
|
+--jmtest(72)
+-- -RW- INTEGER firstKey(1)
Range: 0..100
http://net-snmp.cn/snmp/32.html
- netsnmp 安装与配置
- netsnmp 安装与配置
- netsnmp 安装与配置
- netsnmp的mib解析配置
- net-snmp启用python模块(python-netsnmp安装)
- eclipse安装与配置
- Postfix安装与配置
- Exchange安装与配置
- subversion 配置与安装
- IIS安装与配置
- SDK安装与配置
- VSFTPD 安装与配置
- vsFTPd 安装与配置
- CVS安装与配置
- samba 安装与配置
- NFS配置与安装
- MySQL安装与配置
- honeyd安装与配置
- asp.net程序性能优化的七个方面
- ASP.NET 2.0服务器控件开发之复杂属性
- 英语面试:离职原因篇
- C/C++笔试题(1)
- AJAX - Handling White Space in a Cross-Browser Way
- netsnmp 安装与配置
- 推导出了ejwt的傅立叶变换
- 17种可以考虑买房的情况
- tomcat自动加载应用程序的web.xml
- 在Windows环境下编译NET-SNMP的具体实现步骤
- web.xml中url-pattern子元素接受的形式
- C/C++笔试题(2)
- 技术文档专栏开工!
- EVC到vs2005工程移植