Install NET-SNMP under "SNMP" Linux system

Source: Internet
Author: User
Tags snmp

The version of SNMP used here is net-snmp-5.7.3:http://www.net-snmp.org/download.html

Installation steps:

1. Unzip the installation package:

TAR-XZVF net-snmp-5.7.3.tar.gz

2. Generate the compilation rule by configure:

is with the command:

CD net-snmp-5.7.3

Enter the net-snmp-5.7.3 directory as shown in:

The Configure in the net-snmp-5.7.3 directory is an executable file, and if you want to specify the installation path of the package, first set up the appropriate folder to hold the installation information, which can be written as the path specified by the./configure--prefix=/. The parameter--prefix is used to tell the system where the installation information is stored, and if no path is specified, the package will be installed in the default directory of the system, usually under/usr/local.

Execute command:./configure--prefix=/usr/local/snmp--with-mib-modules= ' Ucd-snmp/diskio ip-mib/ipv4interfacetable '

Note that the--with-mib-modules=ucd-snmp/sidkio option above allows the server to support disk I/O monitoring.

Enter the following problem, you can directly enter without answering, the system will take the default information, where the log file is installed by default in/var/log/snmpd.log. The data storage directory is stored by default under/VAR/NET-SNMP
1. Default version Of-snmp-version (3):
2. System Contact information (@ @no. where) (Configure the device's contacts):
3. System location (Unknown) (the geographical position of the device):
4. Location to write logfile (log file position):
5. Location to Write persistent (data storage directory):

3. Compiling and installing NET-SNMP

Execute under the net-snmp-5.7.3 folder: Make && make install

This step takes a few minutes, don't worry.

4. Configuring the Snmpd.conf File

Use the ' ls ' command to see if the ETC directory exists under the/USR/LOCAL/SNMP directory, if there is no new folder under the directory using ' mkdir etc '.

Copy the example.conf file under the SNMP source directory to the/usr/local/snmp/etc folder "cp example.conf/usr/local/snmp/etc/snmpd.conf":

And make the configuration:

4.1 Configuration allows network access

Locate "AGENT behaviour" as shown in:

  

Modify the following: Add the "agentaddress udp:161" configuration entry as shown:

  

4.2. Select the version of the V2C SNMP protocol

Locate "ACTIVE monitoring" as shown in:

  

Modify the following:

  

4.3, set access rights

  Locate "ACCESS CONTROL" as shown in:

  

Find "rocommunity public default-v systemonly", put the-v systemonly removed, this is set access permissions, removed after access to all, as shown:

  

4.4, save snmpd.conf after exit

  Press the "ESC" key on the upper left corner of the keyboard to exit the edit mode of the VI editor, then enter the command ": Wq" to save the file and exit as shown:

  

After the 4 steps above, the configuration of the snmpd.conf file for SNMP is complete.

5, set NET-SNMP self-start

5.1 Add the following code at the end of the/etc/rc/local file:

/usr/local/snmp/sbin/snmpd-c/usr/local/snmp/share/snmp/snmpd.conf &

5.2 Add the following snippet at the end of the/etc/profile file:

Path=/usr/local/snmp/bin:/usr/local/snmp/sbin: $PATH

Remember to execute the source command.

6. Use the following command to test

Information is present and successful for testing.

Reference files:

Http://www.cnblogs.com/xdp-gacl/p/4016524.html

Install NET-SNMP under "SNMP" Linux system

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.