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!