Install and configure SNMP in CentOS

Source: Internet
Author: User
1. make sure that the snmp service rpm-qa | grepsnmp is installed on the Linux host. If no, find the snmp rpm package on the Linux installation disk for installation, you can also search for an rpm package suitable for your Linux version on the Internet to install it, or use yum.2. to install yuminstall-ynet-snmpnet-snmp-

1. make sure that the snmp service is installed on the Linux host.

Rpm-qa | grep snmp
 

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.

2. Installation

You may need to install

Yum install-y net-snmp-devel net-snmp-libs net-snmp-perl net-snmp-utils mrtg

Some of them are not necessary.-y refers to answering yes to all questions, saving the interaction during installation.

3. start

Input

Snmpd

Service snmpd start

And

Service snmpd status

View the service status.

Note: Sometimes it appears after the service snmpd status is entered

Snmpd dead but pid file exists

Or

Snmpd dead but subsys locked

The reason is that snmpd is not input first. The principle is not very clear, but remember it first.

 

4. configuration

After installation, modify/etc/snmp/snmpd. conf to configure it.

A. modify the default community string.
Com2sec notConfigUser default public
Modify public to a string that you only know

B. remove the # below
# View mib2 shortded .iso.org. dod. internet. mgmt. mib-2 fc

C. run the following statement
Access notConfigGroup "" any noauth exact systemview none
Changed:
Access notConfigGroup "" any noauth exact mib2 none

5. restart the snmpd service

/Etc/rc. d/init. d/snmpd restart

Complete snmpd configuration

 

6. ensure that the Linux iptables firewall has enabled udp port 161 access to our traffic monitoring server.
You can use iptables-L-n to view the current iptables rule.
You can edit the/etc/sysconfig/iptables file to modify iptables rules.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.