Snmp installation, snmp

Source: Internet
Author: User
Tags snmpwalk

Snmp installation, snmp

Switch to the system administrator account
1. Install snmp
Check that the snmp agent is installed.
Rpm-q net-snmp
If not, install snmp
Yum install net-snmp
Set automatic snmp running upon startup
/Sbin/chkconfig snmpd on

2. Configure snmp
Modify/etc/snmp/snmpd. conf
Change Group Name
Find the following lines
Sec. name source community
Com2sec notConfigUser default public
Change the public group name to any other field, for example:
Com2sec notConfigUser default monit

Grant read permission
Find the following lines
Group context sec. model sec. level prefix read write notif
Access notConfigGroup "" any noauth exact systemview none
Change the read permission systemview to all, for example:
Access notConfigGroup "" any noauth exact all none

Find the following lines
Incl/excl subtree mask
View all supported ded. 1 80
Remove # Before view all, for example:
View all supported ded. 1 80

3. Start snmp
Service snmpd start
Restart the snmp service if it has been started.
Service snmpd restart
4. Test snmp
Check whether the port is enabled
Netstat-ln | grep 161

Install the snmp Test Tool
Yum install net-snmp-utils
Test snmp data on the local machine (modify monit to the group name configured)
Snmpwalk-v 2c-c monit localhost system
Remote Test of snmp data (modify the ip address to the server ip address, and install net-snmp for the snmpwalk command)
Snmpwalk-v 2c-c monit ip system

5. Firewall enables UDP161 Port
Iptables-I INPUT-p udp-dport 8091-j ACCEPT
Or directly modify the firewall configuration file.
Vi/etc/sysconfig/iptables
Insert the following after other port number rules:
-A input-p udp-m udp-dport 161-j ACCEPT
Restart the firewall to make the rule take effect
Service iptables restart

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.