Centos 6.5 SNMP Client Installation and configuration version net-snmp-5.7.3

Source: Internet
Author: User
Tags snmp

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

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.