Deploy snmpd on CentOS for jiankongbao

21 Aug 2012
  • install net-snmp

    $ sudo yum install net-snmp
  • edit /etc/snmp/snmpd.conf

    # /etc/snmp/snmpd.conf
    # rocommunity key IP
    rocommunity jiankongbao
    rocommunity jiankongbao
  • run sudo /etc/init.d/snmpd restart
  • run sudo chkconfig snmpd on
  • if you have iptables

    $ sudo iptables -I INPUT 1 -p udp -s --dport 161 -j ACCEPT
    $ sudo iptables -I INPUT 1 -p udp -s --dport 161 -j ACCEPT
    $ sudo cp /etc/sysconfig/iptables /etc/sysconfig/iptables.bak
    $ sudo iptables-save | sudo tee /etc/sysconfig/iptables
  • verify everything is ok

    $ netstat -lpnu | grep 161
    (No info could be read for "-p": geteuid()=509 but you should be root.)
    udp        0      0       *                               -
    $ chkconfig --list snmpd
    snmpd           0:off 1:off 2:on  3:on  4:on  5:on  6:off

Tags: centos, snmpd, jiankongbao, snmp

Related Posts:

comments powered by Disqus
Copyright © 2017 LI Daobing, Powered by github:pages, Jekyll, bootstrap, Designed by quanquan
Fork me on GitHub