Install SNMP in Ubuntu

Source: Internet
Author: User
I found a lot of methods for installing SNMP in Ubuntu on the Internet, and the results are not available. The methods I have summarized below are for your reference only ~ 1. The Installationsudo-iapt-getinstallsnmpdsnmp2.Configuration rename the/etc/snmp/snmpd. conf configuration file to/etc/snmp/snmpd.conf.org: mv/etc/snmp

I found a lot of methods for installing SNMP in Ubuntu on the Internet, and the results are not available. The methods I have summarized below are for your reference only ~

1. Installation

Sudo-I

Apt-get install snmpd snmp

2. Configuration

Rename the configuration file/etc/snmp/snmpd. conf to/etc/snmp/snmpd.conf.org:

Mv/etc/snmp/snmpd. conf/etc/snmp/snmpd.conf.org

Create a new/etc/snmp/snmpd. conf file:

Rocommunity public

Syslocation "Chengdu"

Syscontact mail@mail.com

Open/etc/default/snmpd:

Gedit/etc/default/snmpd

Find

# Snmpd options (use syslog, close stdin/out/err ).

SNMPDOPTS = '-Lsd-Lf/dev/null-u snmp-I-smux-p/var/run/snmpd. pid 127.0.0.1'

Change it

# Snmpd options (use syslog, close stdin/out/err ).

# SNMPDOPTS = '-Lsd-Lf/dev/null-u snmp-I-smux-p/var/run/snmpd. pid 127.0.0.1'

SNMPDOPTS = '-Lsd-Lf/dev/null-u snmp-I-smux-p/var/run/snmpd. pid-c/etc/snmp/snmpd. conf'

Restart snmpd

/Etc/init. d/snmpd restart

3. Test

Snmpwalk-v 1-c public localhost

An output indicates that snmp and snmpd have been installed successfully.

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.