Net-snmp of installation and configuration arrangement

Source: Internet
Author: User
Tags snmp

installation

Select the latest version to download in http://www.net-snmp.org/download.html

wget http://sourceforge.net/projects/net-snmp/files/net-snmp/5.6/net-snmp-5.6.tar.gz

TAR-XVF net-snmp-5.6.tar.gz

CD net-snmp-5.6

./configure--prefix=/usr/local/net-snmp--with-default-snmp-version= "2"--with-logfile=/usr/local/net-snmp/ Log/snmplog.log--with-persistent-directory=/var/net-snmp

note
-- prefix  installed path
-- with - default - snmp - version  default version
-- with logfile  log file path
-- with - - directory  fixed data store directory


Make && make install

CP exaple.conf/usr/local/net-snmp/share/snmp/snmpd.conf

VI snmpd.conf

60  #        sec.name  source           Community
 com2sec  local     localhost       community
62  com2sec mynetwork  network / 24       community



modify to     

60  #        sec.name  source           Community
 com2sec  local     localhost        public
62  com2sec mynetwork network / 24        public

Change the mynetwork/24 inside to the host IP address that needs to view the SNMP information

Change the community to the value you set.

And then save the exit



edit/etc/rc.local Add as self-boot
Add the following line:
/usr/local/net-snmp/sbin/snmpd-c/usr/local/net-snmp/share/snmp/snmpd.conf &
set Environment variables, edit/etc/profile
Add the following line before export
Path=/usr/local/net-snmp/bin:/usr/local/net-snmp/sbin: $PATH

Check

Use Ps-aux | grep snmpd to see if the SNMPD process is started
Netstat-an |grep 161//See if SNMP is started

use the following command to check SNMP for system data from this machine

snmpwalk-v 2c-c public localhost

If the return is not time out, but the system information indicates that the NET-SNMP installation was successful


This article is from the "Wang Shengguo Pool" blog, make sure to keep this source http://wangsheng1.blog.51cto.com/29473/1594828

Net-snmp of installation and configuration arrangement

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.