snmpd Installation

yum install -y net-snmp net-snmp-devel net-snmp-utils cp -av /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig vi /etc/snmp/snmpd.conf #------------------------------------------------ com2sec local localhost public com2sec mynetwork 192.168.0.0/24 public group MyRWGroup any local group MyROGroup any mynetwork view all included .1 80 view mib2 included .iso.org.dod.internet.mgmt.mib-2 fc access MyROGroup "" any noauth 0 all none none access MyRWGroup "" any noauth 0 all all all syslocation Unknown (edit /etc/snmp/snmpd.conf) syscontact Root (configure /etc/snmp/snmp.local.conf) pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat #------------------------------------------------ /etc/init.d/snmpd start chkconfig snmpd on

P.S. Add/Modify "com2sec" , the source ip is allowed to access.

vi /etc/sysconfig/snmpd OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid" ## OR OPTIONS="-LS0-5d -Lf /dev/null -p /var/run/snmpd.pid -x TCP:5000 UDP:5000"

Disable log or change port if necessary , remember change allow rule in firewall.

vi /etc/sysconfig/iptables -A INPUT -m udp -p udp --dport 161 -j ACCEPT /etc/init.d/iptables start

Add firewall rule if in necessary for outside SNMP server (MRTG/PRTG).

snmpwalk -v 2c -c public localhost system snmpwalk -v 2c -c public 192.168.1.2 system

Test from MRTG snmp server.


Server is hosted by Alanstudio
Linux Operating System

Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.