SNMP installation and configuration.

This describe howto install and configure the SNMP on a RedHat or CentOS and Suse.

1. Installation
Run command yum for RH and Centos, for Suse use zypper and install net-snmp-utils

for RH/Centos use yum
root# yum install net-snmp-utils

for Suse use zypper:

root# zypper install net-snmp-utils

2. Configuration
Add the following lines to /etc/snmp/snmpd.conf

rocommunity public
syslocation "IT Department"

and then start the snmpd service

root# /etc/init.d/snmpd start

Do snmpwalk to make sure it is working

root# snmpwalk -v 1 -c public -O e

sample output:
SNMPv2-MIB::sysDescr.0 = STRING: Linux 2.6.18-274.el5 #1 SMP Fri Jul 22 04:49:12 EDT 2011 i686
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (719265) 1:59:52.65

And finally, make sure snmpd starts next time you restart your machine.

root# chkconfig snmpd on

Leave a Reply

Your email address will not be published. Required fields are marked *