Net-SNMP installation and configuration

Source: Internet
Author: User

Net-SNMP installation and configuration

Install

Download the latest version at 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 installation path
-- With-default-snmp-version default version
-- With-logfile Log File Path
-- With-persistent-directory: fixed data storage directory


Make & make install

Cp EXAPLE. conf/usr/local/net-snmp/share/snmp/snmpd. conf

Vi snmpd. conf

 

60 # sec. name source community
61 com2sec local localhost COMMUNITY
62 com2sec mynetwork NETWORK/24 COMMUNITY

Change

60 # sec. name source community
61 com2sec local localhost public
62 com2sec mynetwork NETWORK/24 public

Change mynetwork/24 to the ip address of the host to view snmp information.

Change community to the value you set.

Save and exit

Edit/etc/rc. local to be self-started
Add the following line:
/Usr/local/net-snmp/sbin/snmpd-c/usr/local/net-snmp/share/snmp/snmpd. conf &
Set environment variables and edit/etc/profile
Add the following line before the export
PATH =/usr/local/net-snmp/bin:/usr/local/net-snmp/sbin: $ PATH

Check

Run ps-aux | grep snmpd to check whether the snmpd process is started.
Netstat-an | grep 161 // check whether snmp is enabled

Run the following command to check whether snmp obtains system data from the local machine:

Snmpwalk-v 2c-c public localhost

If the returned result is not Time out, the system information indicates that the net-snmp installation is successful.

Cacti does not work out of the figure to fix the database

Error message:
Invalid PHP: Poller [0] ERROR: SQL Assoc Failed !, Error: '200', SQL: "select poller_output.output, poller_output.time, hour from (poller_output, poller_item) where (hour = hour and hour = hour) LIMIT 145"

Solution:
Mysqlcheck -- auto-repair -- databases cacti-p
Or (no password is set for mysql)
Mysqlcheck -- auto-repair -- databases cacti

Install Net-SNMP in RPM mode in Linux

Use of Net-SNMPv3 in openSUSE 11.2

Net-SNMP mib2c Configuration

Install Net-SNMP in Ubuntu

Ubuntu installation Net-SNMP-5.5.1 method summary

Net-SNMP details: click here
Net-SNMP: click here

This article permanently updates the link address:

Related Article

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.