Centos 6.5 SNMP Client Installation and configuration
SNMP version: net-snmp-5.7.3.tar.gz
1. Download the Software
Cd/usr/local/src
Yum-y Install GCC
wget http://nchc.dl.sourceforge.net/project/net-snmp/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz
2. Unzip the build installation
TAR-ZXVF net-snmp-5.7.3.tar.gz
CD net-snmp-5.7.3
./configure--with-default-snmp-version= "2"--with-sys-contact= "Zjqs"--with-sys-location= "XSIDC"--with-logfile= " /var/log/snmpd.log "--with-persistent-directory="/opt/net-snmp "
Make
Make install
4. Configuration
/usr/local/sbin/snmpd
The/USR/LOCAL/SBIN/SNMPD will spawn under/opt//opt/net-snmpd/snmpd.conf
cd/opt/net-snmpd/
Vim snmpd.conf
Add the following content
Com2sec notconfiguser Default Public
Group Notconfiggroup v1 Notconfiguser
Group Notconfiggroup v2c Notconfiguser
View all included. 1
Access Notconfiggroup "" Any noauth exact none none
Syslocation www.osyunwei.com
Comment Description
Public is a group number
Syslocation for position
Start SNMPD
Cd/opt/net-snmpd
/usr/local/sbin/snmpd-c snmpd.conf
Compiling a firewall policy
Vim/etc/sysconfig/iptables Add the following content
-A input-m udp-p UDP--dport 161-j ACCEPT
Restarting the firewall
Service Iptables Restart
Script one-click Installation
#!/bin/bash
Cd/usr/local/src
Yum-y Install GCC
wget http://nchc.dl.sourceforge.net/project/net-snmp/net-snmp/5.7.3/net-snmp-5.7.3.tar.gz
TAR-ZXVF net-snmp-5.7.3.tar.gz
CD net-snmp-5.7.3
./configure--with-default-snmp-version= "2"--with-sys-contact= "Zjqs"--with-sys-location= "XSIDC"--with-logfile= " /var/log/snmpd.log "--with-persistent-directory="/opt/net-snmp "
Make
Make install
/usr/local/sbin/snmpd
cd/opt/net-snmpd/
echo "Com2sec notconfiguser default Public" >snmpd.conf
echo "Group Notconfiggroup v1 notconfiguser" >>snmpd.conf
echo "group Notconfiggroup v2c Notconfiguser" >>snmpd.conf
echo "View all included. 1" >>snmpd.conf
echo "Access Notconfiggroup" "Any noauth exact all none None" >>snmpd.conf
echo "Syslocation www.osyunwei.com" >>snmpd.conf
/usr/local/sbin/snmpd-c snmpd.conf
echo "-A input-m udp-p UDP--dport 161-j ACCEPT" >>/etc/sysconfig/iptables
Note: It is recommended to change the group number
Centos 6.5 SNMP Client Installation and configuration version net-snmp-5.7.3