How To Enable snmp in centos

Source: Internet
Author: User
Tags snmpwalk snmpv3
Net-SNMP is a free, open-source SNMP implementation, formerly called UCD-SNMP. It includes the source code of agent and multiple management tools and supports multiple extension methods. [1] It not only extends the acquisition method, but also extends the data type. Install Net-SNMP

CentOS and other RedHat products provide net-snmp Binary packages. We can install it directly from the source.

yum install net-snmp net-snmp-devel net-snmp-utils

Note: net-snmp-devel is used to use net-snmp-config, and net-snmp-utils is used to use snmpwalk.

Configure Net-SNMP
create-snmpv3-user -ro -A snmp@jiankongbao -a MD5 jiankongbao

AboveCommandCreate an snmpv3 user, read-only, use MD5, username is jiankongbao, password is snmp @ jiankongbao.

Note: Disable the net-snmp service before running it.

service snmpd stop
Run Net-SNMP

The method for running the Net-SNMP service is relatively simple, but the name of the Net-SNMP service is snmpd.

service snmpd start

If you want to add a list of automatically running services at startup:

chkconfig snmpd on
Detect Net-SNMP

We can use snmpwalk to check whether the snmp service is enabled normally.

snmpwalk -v 3 -u jiankongbao -a MD5 -A "snmp@jiankongbao" -l authNoPriv 127.0.0.1 sysDescr

If everything is normal, a normal result is returned. For more information about snmpwalk parameters, see the man documentation.

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.