ArticleDirectory
- 1) install SNMP
- 2) Configure SNMP
- 3) Start and Stop SNMP
- 4) Firewall
(1) install SNMP in Linux
For more information, see how to install SNMP in Linux. Generally, the SNMP service is automatically installed in Linux. Run the following command to check whether the SNMP service is installed and whether the package is installed.
[Root @ IDC ~] # Rpm-Qa | grep SNMP
Net-snmp-libs-5.1.2-11.EL4.7
Net-snmp-5.1.2-11.EL4.7
2) Configure SNMP
Modify as follows/Etc/snmp/snmpd. confFile
A. Modify the default community string (SNMP read value password in sum)
Com2sec notconfiguserDefault Public
SetPublicModify the string that is only known to you
Set"Default"To which machine you want to view your SNMP information, for example, if the IP address of sum is 10.10.10.10, change it to this IP address. If this parameter is left blank, it indicates that all machines are sufficient.
B. Remove the # below
# View mib2 shortded .iso.org. DOD. Internet. Mgmt. mib-2 FC
To enable all functions, you can use the following line (if not, you can add one line ):
View All supported ded. 1 80
C. Run the following statement
Access notconfiggroup "" any noauth exact systemview none
Changed:
Access notconfiggroup "" any noauth exact mib2 none
Or:
Access notconfiggroup "" any noauth exact All None none
3) Start and Stop SNMP
General Use: Service snmpdStart | stop | restartCommand. Or:
#/Etc/rc. d/init. d/snmpd restart
4) Firewall
If the firewall is enabled in Linux, open UDP port 161. Ensure that the Linux iptables firewall has enabled UDP port 161 access to the sum monitoring server.
Can I use iptables? L? N view the current iptables rule
You can edit the/etc/sysconfig/iptables file to modify iptables rules.