LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   910824 - how to install snmp offline? (http://www.linuxquestions.org/questions/linux-newbie-8/910824-how-to-install-snmp-offline-4175437091/)

hamidi2 11-14-2012 06:40 AM

910824 - how to install snmp offline?
 
hi
in a clean ubuntu 10.10 system which is not connected to the internet i need to run the following command:

snmpget -v1 -c public 10.25.25.34 1.3.6.1.4.1.2254.2.4.1.7.0

now i get the following error:

The program 'snmpget' is currently not installed. You can install it by typing:
apt-get install snmp

since the system is not connected to the internet i can't use apt-get. what can i do instead?
thx

SteveThePirate87 11-14-2012 05:10 PM

Hi,

Download and transfer it to the computer then install from source, here is the link;

http://net-snmp.sourceforge.net/download.html

Steve

---------- Post added 14-11-12 at 11:10 PM ----------

Hi,

Download and transfer it to the computer then install from source, here is the link;

http://net-snmp.sourceforge.net/download.html

Steve

Habitual 11-15-2012 05:22 AM

on the host (ubuntu?) that does have internet
Code:

sudo apt-get clean
sudo apt-get -d snmp
sudo cp /var/cache/apt/archives/* /path/to/media

then copy contents of /path/to/media to the system that requires snmp installed, once copied to the hard drive, then
Code:

sudo dpkg -i /path/to/local/filename.deb
Doesn't download dependencies, if any are needed.

hamidi2 11-15-2012 05:36 AM

see whether i'm right?:
by running the command:
sudo apt-get clean
i cause all cached package in /var/cache/apt/archives be removed and the folder gets empty.
by running the command:
sudo apt-get -d snmp
i cause all packages required for snmp get downloaded to /var/cache/apt/archives.
by running the command:
sudo dpkg -i
one after another i cause the whole snmp gets installed. right?
if so, there're some disadvantages:
1. the source system loses all cached packages. i may prepare a backup before doing this though.
2. i've already these packages, because i've a system in which snmp is installed. how can i know that which ones required not to have to download them again? can apt-get list them instead of downloading them again?
3. in the last step i don't know the order of packages which have to be installed. maybe it's better to copy them to /var/cache/apt/archives then run apt-get install snmp, isn't it?
thx

hamidi2 11-15-2012 05:39 AM

Steve...: thanks for your suggestion, but i prefer not to compile sources. it may generate errors and compile switches may be different from one the publisher has set. i'm also not an expert in linux. it seems that binaries in the link u mentioned is compiled for Windows and i don't know what to do with sources which make an executable file for Windows is Linux.

Habitual 11-15-2012 07:27 AM

Quote:

Originally Posted by hamidi2 (Post 4829919)
see whether i'm right?:
by running the command:
sudo apt-get clean
i cause all cached package in /var/cache/apt/archives be removed and the folder gets empty.
by running the command:
sudo apt-get -d snmp
i cause all packages required for snmp get downloaded to /var/cache/apt/archives.
by running the command:
sudo dpkg -i
one after another i cause the whole snmp gets installed. right?
if so, there're some disadvantages:
1. the source system loses all cached packages. i may prepare a backup before doing this though....

Always make backups. :)
I don't know exactly what dpkg -i will do for Dependencies...sorry.

Net-Snmp on Ubuntu says to "sudo apt-get install libperl-dev", so that should be
Code:

sudo apt-get -d net-snmp libperl-dev
and then check /var/cache/apt/archives/

Copy those .debs to the off-line host and install in this order using dpkg -i ...
libperl-dev*.deb
net-snmp*.deb

I believe the package I installed on about a dozen Ubuntu servers is net-snmp

HTH.

JJ


All times are GMT -5. The time now is 04:57 PM.