How to install Perl modules on a limited server?

I have a server on which I can ssh, but what is it. Otherwise, it is completely closed from the outside world. I am trying to deploy some of the scripts that I wrote to him, but they have several Perl dependencies (Params :: Validate, XML :: Simple, etc.). I can’t get them through yum, because our satellite server does not have these packages and the usual CPAN installation will not work, because the host is so limited. Moving module sources and compiling them is extremely tedious. I have been doing this for more than one day, trying to resolve addictions, without end. Is there any way around this? Any help is appreciated.

+3
source share
5 answers

If you can, configure the parallel system as close as possible (by architecture and perl version) to the closed system and install all your dependencies there in a separate lib directory using local :: lib . Then you can simply copy this directory to your private system and use local :: lib again (and set some environment variables), your code will be able to use this directory.

+6
source

See this , it describes several methods that you can use to create CPAN modules.

+1
source

-, ;-) ( Linode rocks!).

, , @ .

, , , Perl, PAR::Packer script scp .

+1

cpan ? , .

curl -L http://cpanmin.us | perl - App::cpanminus

local:: lib.:-D

Chromatic , ( ) perl .

+1

I am using SSH tunneling to tunnel from a remote server back to a local proxy. Thus, you can install any modules that you need. Just set the http_proxy variable to the local port, which is redirected remotely (if that makes sense) from your local machine.

i.e.

ssh user@remote -R 3128:proxy_ip:3128  (for a tunnelling a Squid setup)

and then on the remote server in cpan

o conf http_proxy=http://localhost:3128
o conf commit
0
source

Source: https://habr.com/ru/post/1753748/


All Articles