How to install snmp in centos/debian

In centos

yum install net-snmp-utils

In debian

apt-get install snmpd

Take a Backup of Original Configuration file and Create a new one

cd /etc/snmp
mv snmp.conf snmp.bk
mcedit snmp.conf

Create a new config file from scratch

rocommunity  public
syslocation  "MysqlServer, unit1"

Now Restart the snmpd server

In Centos

/etc/init.d/snmpd start

In Debian

 /etc/init.d/snmpd start

Check if snmp server is running or not (From the server itself)

 pgrep snmpd
snmpwalk -v1 -cpublic 192.0.0.ip-of-server

Leave a Reply

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