Install Net-SNMP in Ubuntu

Source: Internet
Author: User
Tags snmpget
Install net-snmp In Ubuntu. The specific steps are as follows: 1. Obtain the net-snmp installation package. Here we select the source code installation method. Of course, you can also select the ubuntu network Download Method for installation, for example: & gt; sudoapt-getinstallnet-snmp or manually compile and install it from the network down, here I select the latest net-snmp5.7.1, the downloaded format is net-snmp-5.7.1.ta

To install net-snmp in Ubuntu, follow these steps:

1. Obtain the net-snmp installation package. Here we select the source code installation method. Of course, you can also select the ubuntu network Download Method for installation, such:
> Sudo apt-get install net-snmp
Bytes

2. The source code installation package must be decompressed as follows:

We can create an snmp directory first.
> Mkdir snmptemp
> Cd snmptemp
> Music net-snmp-5.7.1.tar.gz ./
> Tar-zxvf net-snmp-5.7.1.tar.gz
After decompression, we will change the directory name as follows:
> Music net-snmp-5.7.1./net-snmp

3. Install the snmp dependency package in Ubuntu as follows:
> Sudo apt-get install libperl-dev
The above installation method is to download and then automatically install


4. Go to the extract directory and start configuration.
> Cd net-snmp
>. /Configure -- with-default-snmp-version = "3" -- with-sys-contact = "@ no. where "-- with-sys-location =" Unknown "-- with-logfile ="/var/log/snmpd. log"

-- With-persistent-directory = "/var/net-snmp"
After the configuration is complete, you can view the following Net-snmp configuration information:
---------------------------------------------------------
Net-SNMP configuration summary:
---------------------------------------------------------

5. Compile and install
> Cd net-snmp
> Sudo make
> Sudo nake install

6. To set the command for running snmp in any directory, perform the following settings:
Echo export LD_LIBRARY_PATH =/usr/local/lib>. bashrc

7. Verify the installation as follows:
> Snmpget -- version
If successful, the current installation version number is displayed, NET-SNMP version: 5.7.1
If the following error is prompted:
Snmpget: error while loading shared libraries: libnetsnmp. so.30: cannot open shared object file: No such file or directory
The solution is as follows: cp/usr/local/lib/libnetsnmp. so.30/usr/lib
Or copy all the packages under/usr/local/lib to/usr/lib. Run the command to obtain the version number again, net-snmp is successfully installed in Ubuntu!

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.