CentOS SNMP Client Setup

  1. Install

    root@cmlin03:/# yum install net-snmp-utils
  2. Backup original config

    joe@cmlin03:/etc/snmp# sudo mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig
  3. Create new config

    joe@cmlin03:/etc/snmp# sudo vi /etc/snmp/snmpd.conf
    rocommunity	mycommunity
    syslocation	"office rack, large server"
    syscontact	joe@smithinc.com
  4. Configure iptables to allow snmp connections

    sudo vi /etc/sysconfig/iptables
    -A INPUT -p tcp --dport 161 -j ACCEPT
    -A INPUT -p udp --dport 161 -j ACCEPT
  5. Start the service

    /etc/init.d/snmpd start
  6. Test

    joe@cmlin02:/etc/snmp# snmpwalk -v 1 -c mycommunity -O e localhost
  7. Configure to start snmpd on boot

    joe@cmlin02:/etc/snmp# sudo chkconfig snmpd on