Install and use SNMP in CentOS
GuideThe Simple Network Management protocol (SNMP) is composed of a set of network management standards, including an application layer protocol, a database schema, and a group of resource objects. This protocol supports network management systems to monitor whether devices connected to the network have any management concerns. This Protocol is part of an Internet protocol cluster defined by the internet Engineering team (IETF, Internet Engineering Task Force. The goal of SNMP is to manage software and hardware platforms produced by many manufacturers on the Internet. Therefore, SNMP is greatly affected by the Internet standard network management framework. SNMP has been released to the third version, and its functions have been greatly enhanced and improved.1. Make sure that the snmp service is installed on the Linux host.
# rpm -qa |grep snmpnet-snmp-5.5-49.el6.i686net-snmp-libs-5.5-49.el6.i686php-snmp-5.3.3-27.el6_5.i686
If not, find the snmp rpm package on the Linux installation disk for installation, or search for the rpm package suitable for your Linux release on the Internet for installation, or use yum for installation.
2. InstallationThere are several installation steps:
yum install -y net-snmpyum install -y net-snmp-develyum install -y net-snmp-libsyum install -y net-snmp-perlyum install -y net-snmp-utilsyum install -y mrtg
Some of them are not necessary.-y refers to answering yes to all questions, saving the interaction during installation.
3. StartEnter service snmpd start and use service snmpd status to view service status.Note: sometimes it appears after the service snmpd status is enteredSnmpd dead but pid file existsOrSnmpd dead but subsys lockedThe reason is that snmpd is not input first. The principle is not very clear, but remember it first.
4. ConfigurationModify/etc/snmp/snmpd after installation. conf to configure A, modify the default "community" string com2sec notConfigUser default public to change the public to the string that you only know; and the default string to specify the server to collect data, replace this field with the IP address that allows the collection server. B. Remove # view mib2 encoded .iso.org. dod. internet. mgmt. mib-2 fc C, change the following statement access notConfigGroup "" any noauth exact systemview none to: access notConfigGroup "" any noauth exact mib2 none
5. Restart the snmpd service/etc/rc.d/init.d/snmpd restart
Complete snmpd Configuration
6. Make sure that access to udp port 161 is enabled on the iptables firewall.You can use iptables-L-n to view the current iptables rule.
You can edit the/etc/sysconfig/iptables file to modify iptables rules.
Original address: http://www.linuxprobe.com/snmp-update.html