如何在受限服务器上安装Perl模块? [英] How can I install Perl modules on a restricted server?

查看:74
本文介绍了如何在受限服务器上安装Perl模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可以插入的服务器,仅此而已。否则,它将与外界完全隔离。我正在尝试部署一些我写给它的脚本,但是它们有几个Perl依赖项(Params :: Validate,XML :: Simple等),因为我们的卫星服务器没有那些软件包,所以我无法通过yum获得它们由于主机受此限制,因此普通的CPAN安装也无法正常工作。移动模块源并进行编译非常繁琐。我已经做了整整一天的时间,试图解决依赖性问题,而且还没有结束。有没有办法解决?

I have a server that I can ssh into but that's it. Otherwise it is totally closed off from the outside world. I'm trying to deploy some scripts I wrote to it but they have several Perl dependencies (Params::Validate, XML::Simple, etc.) I can't get them via yum since our satellite server doesn't have those packages and the normal CPAN install won't work either since the host is so restricted. Moving the module sources over and compiling is extremely tedious. I've been doing that for over a day, trying to resolve dependencies, with no end in sight. Is there any way around this? Any help is greatly appreciated.

推荐答案

如果可以的话,请尽可能建立一个并行系统(就体系结构而言,和Perl版本)安装到封闭的系统,然后使用 local将所有依赖项安装到单独的lib目录中:: lib 。然后,您可以简单地将该目录scp到封闭系统中,然后再次使用local :: lib(并设置一些环境变量),您的代码将能够使用该目录。

If you can, set up a parallel system as close as possible (as far as architecture, and perl version) to your closed system, and install all your dependencies there into a separate lib directory using local::lib. Then you can simply scp over that directory to your closed system, and again using local::lib (and setting up some environment variables), your code will be able to utilize that directory.

这篇关于如何在受限服务器上安装Perl模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆