Install and configure SNMP in linux

Source: Internet
Author: User
Tags snmpwalk
In linux, the SNMP installation configuration takes the redhat installation configuration as an example: compile and install www.2cto.com. First, we need to download the Net-SNMP source code and select a version, such as the latest version 5.7.1, the address is http://sourceforge.net/projects/net-snmp/files/net as follows...
In linux, the SNMP installation configuration takes the redhat installation configuration as an example: compile and install www.2cto.com. First, we need to download the Net-SNMP source code and select a version, such as the latest version 5.7.1, the address is as follows http://sourceforge.net/projects/net-snmp/files/net-snmp/5.7.1/ next to download the source code package for decompression, as follows:
Tar xzvf net-snmp-5.7.1.tar.gz then uses configure to generate compilation rules, as shown below: cd net-snmp-5.7.1. /configure -- prefix =/usr/local/snmp -- with-mib-modules = ucd-snmp/diskio -- with-default-snmp-version = "3" -- with-mib- modules = ucd-snmp/diskio options, allows the server to support disk I/O monitoring. -- With-default-snmp-version option, is the default V3 version -- with-sys-location -- with-sys-contact -- with-logfile log file directory -- with-persistent-directory next, start to compile and install make & make install. so far, we have an SNMP agent that can run. It is located in/usr/local/snmp/sbin/snmpd, before starting it, we also need to make some necessary settings to configure the EXAMPLE in the source package of the V3 version copy. CONF to =/usr/local/snmp/share/snmp/snmpd. conf cp/home/net-snmp-5.7.1/EXAMPLE. conf/usr/local/snmp/share/snmp/snmpd. conf modify snmpd. con F file rouser unimas auth Note: When adding a user, make sure that the snmp service is not running; otherwise, the user cannot be added. As you can see, in v3, "rouser" is used to indicate the type of the read-only account. then "jiankongbao" is the specified user name, and "auth" at the end indicates that the account needs to be verified. CreateUser unimas MD5 mypassword this line is configured to create a user named "unimas" with the password "mypassword" and encrypted transmission with MD5. Note that the password must contain at least 8 bytes of cp/usr/local/snmp/share/snmp/snmpd. conf/var/net-snmp/snmpd. conf www.2cto.com: Set the net-snmp environment variable. set the environment variable to append PATH =/usr/local/snmp/bin:/usr/local/snmp/sbin under the/etc/profile file: $ PATH export PATH is added to the startup file in/etc/rc. append/usr/local/snmp/sbin/snmpd-c/usr/local/snmp/share/snmp/snmpd to the end of the local file. conf & restart the net-snmp service/usr/local/snmp/sbin/snmpd-c/usr/local/snmp/share/snmp. conf & or use service snmpd stop service snmpd start test/usr/local/snmp/bin/snmpwalk-v 3-l authNoPriv-a MD5-u unimas-A hzhz2003 127.0.0.1: 161 if sysDescr is normal, the SNMPv2-MIB: sysDescr.0 = STRING: Linux localhost will appear. localdomain 2.6.18-274. el5 #1 SMP Fri Jul 22 04:43:29 EDT 2011 x86_64 test/usr/local/snmp/bin/snmpwalk-v 3-l authNoPriv-a MD5-u unimas-A hzhz2003 127.0.0.1: 161 if Nic or other information is returned, the configuration is successfully installed.
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.