Monday, March 21, 2016

Three steps get SNMP working on CentOS and RedHat



1. Install snmp with yum or other method

2. Configure

Backup and setup readonly user in config file
>mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.org
>vi /etc/snmp/snmpd.conf

    rocommunity  public
    syslocation  “My Computer Room”

 Restart Service

 >service snmpd restart

 Set Service to autostart

>chkconfig –list snmpd
snmpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off

>chkconfig snmpd on

Open port in firewall if needed
>vi /etc/sysconfig/iptables

-A INPUT -p udp -m state –state NEW -m udp –dport 161:162 -j ACCEPT
-A INPUT -p tcp -m state –state NEW -m tcp –dport 161:162 -j ACCEPT

Restart Firewall
>service iptables restart

3. Test

No comments:

Post a Comment