Re: Perl Module Installation
by davido (Cardinal) on Dec 10, 2020 at 17:26 UTC
|
I would handle this either through operating system level package management tools (yum, apt, etc.), or through containerization, or through setting up a MiniCPAN or DarkPAN. And I've done all three of those for different situations. Your organization must have some way of keeping servers updated, and installing software on them.
However, Net::SSH is pure Perl. And every dependency it requires ships with Perl 5. You should be able to do one of two things (in order of preferability):
- Download the tarball, unpack it, and run the mantra; perl Makefile.PL && make && make test && make install
- Copy the code itself into a Net/SSH.pm path within one of your @INC paths. This is actually the copy/paste approach.
The first solution has the advantage that it's predictable and repeatable. So long as the module's maintainers don't add external dependencies, it will always work. And you can hold onto that tarball should you ever need to reinstall the same version. The second solution's advantage is that it lets you work with a clear-text source code, which is easy to copy and paste. Ok, there's a third alternative; you unpack the tarball on a build system, and then copy/paste each file in the distribution into a build directory on the target box. That seems like too much work.
If your server can be hit over SSH, then you have scp or sftp, probably. Establishing a build server somewhere in network proximity wouldn't be awful, unless there are real security requirements that prevent that happening.
| [reply] [d/l] [select] |
Re: Perl Module Installation
by stevieb (Canon) on Dec 10, 2020 at 16:35 UTC
|
Check out minicpan. It allows you to save a complete copy of the CPAN (which includes only the most recent release of each distribution) locally, which you can then copy over to your offline systems, and use it as if you were using the online version.
I've never used it myself, but I know others who have, and it's specifically used for situations such as this. With one person I know, they have used it for years so that they can do testing and development while on flights (nowadays airlines have onboard wifi for the most part, but I digress).
Perhaps some of these users can speak up with their experiences.
| [reply] |
Re: Perl Module Installation
by hippo (Bishop) on Dec 10, 2020 at 11:50 UTC
|
Yes, it probably is possible. But if your server only has "copy & paste" connectivity to "The Internet" what good will Net::SSH be?
| [reply] |
|
But if your server only has "copy & paste" connectivity to "The Internet" what good will Net::SSH be?
I understand the sentiment, and it made for a ++funny reply. But in the OP's defense, it's quite possible (and probably not uncommon) to have a local network isolated from the internet as a whole, where it still makes sense to use SSH to communicate between the nodes in the LAN.
To misteradey's question, trying to add confirmation to what you just said: it does appear that Net::SSH is pure-Perl (and thus could copy/paste) and doesn't have any non-core dependencies that I noticed (so wouldn't require copy/pasting other modules to get Net::SSH to work).
| [reply] |
|
Thank you.
In my defence - this server is indeed part of a network with many thousands of devices, which I need to control via SSH (from the server). None of which have access to the Internet.
| [reply] |
|
|
| [reply] |
|
|
|
| [reply] |
|
Well yanno, as drive densities increase and get smaller, this type of transmission is seeing a resurgence in utility :)
| [reply] |
Re: Perl Module Installation
by perlfan (Vicar) on Dec 11, 2020 at 18:57 UTC
|
Seems like if you can ssh into said remote server, you can scp into it? Or maybe not you said it's restrictive. Or is this a serial connection? If this is the case, and it's been a long time since I've messed with it, 'kermit' might allow you to push files over to this machine (if it is a serial connection).
Seek and ye shall find - http://www.columbia.edu/~fdc/misc/kermit-file-transfer-overview.html - i.e., if this is indeed your situation. Hope that helps. | [reply] |