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