How to instasll SNMP
First, download the file from http://ftp.yz.yamagata-u.ac.jp/pub/network/net-snmp/
Now, tar the file, using this command (this example use ver 5.1, but you may use it for other version).
#tar -zxvf net-snmp-5.1.4.tar.gz
#cd net-snmp-5.1.4
# ./configure –prefix=/usr/local/snmp
#make
#make install
# ee /usr/local/snmp/share/snmp/snmpd.conf
*******the content************
com2sec public HOSTNAME public
group public v1 public
group public v2c public
group public usm public
view all included .1
access public “” any noauth exact all none none
**** Change the HOSTNAME (or IP ADDRESS)***
After snmpd.conf created, now actiavate snmp using commands below:
# /usr/local/snmp/sbin/snmpd -c /usr/local/snmp/share/snmp/snmpd.conf
checking whether snmp daemon runs flawlessly?
# /usr/local/snmp/bin/snmpwalk -v 1 -c public HOSTNAME system
change the HOSTNAME with a hostname or IP Address you entered on “snmpd.conf”, if it works, you’ll get a message like this.
———
…….
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.8072.3.2.255
SNMPv2-MIB::sysUpTime.0 = Timeticks: (7256) 0:01:12.56
SNMPv2-MIB::sysContact.0 = STRING: root@
SNMPv2-MIB::sysName.0 = STRING: host.hostname.org
SNMPv2-MIB::sysLocation.0 = STRING: Unknown
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.2 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.3 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.5 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.2 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.3 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.5 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00
Next, you can set the snmpd to dun from startup automatically by executing:
# echo “usr/local/snmp/sbin/snmpd -c /usr/local/snmp/share/snmp/snmpd.conf” >> /etc/rc.local