SNMP Installation on CentOS

Steps to install SNMP on CentOS

#1. Install SNMP package

 yum install net-snmp net-snmp-utils

 #2. Configure SNMP

 Make a backup of the original configuration file

mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig

Create a new SNMP configuration file by running:

touch /etc/snmp/snmpd.conf

 Now edit /etc/snmp/snmpd.conf and add the Strong Community String in following line (eg. community string:TtL*h!wHur)

====================================

# First, map the community name "public" into a "security name"

#       sec.name  source          community

com2sec notConfigUser  default      TtL*h!wHur

====================================

#3. Start SNMP Service

service snmpd restart

chkconfig snmpd on

 

#4. Configure System firewall Setting

 Run the following command to allow SNMP traffic from system firewall.

firewall-cmd --zone=public --add-port=161/udp --permanent

firewall-cmd --zone=public --add-port=161/tcp --permanent

firewall-cmd --zone=public --add-port=162/udp --permanent

firewall-cmd --zone=public --add-port=162/tcp --permanent

firewall-cmd --reload

No comments

Powered by Blogger.