如何手动(即脱机)手动安装Redis perl库以及从何处获得要安装的所有依赖项 [英] How Can I Install Redis perl library Manually i.e offline.And From Where Can I Get All The Dependencies To Install

查看:111
本文介绍了如何手动(即脱机)手动安装Redis perl库以及从何处获得要安装的所有依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装check_redis插件,为此我需要redis perl库,但是我无法访问CPAN和Internet.So是否可以通过下载zip文件和所有依赖项来进行安装.我正在使用nagios核心.这是我要安装的插件

I am trying to install check_redis plugin and for that i need redis perl library but i don't have access to CPAN and internet.So Is there any way to install by downloading zip file and all the dependencies.I am using nagios core.Here is the plugin i am trying to install

推荐答案

因为我在工作中遇到类似的问题,所以碰巧写了有关该主题的个人问答.在这里:

Because I had a similar problem at work I happened to write my personal Q&A on this topic. Here it is:

Q: How to install CPAN modules without Internet access?
A: 1. Install CPAN::Mini on the internet machine:
          $ cpan CPAN::Mini
   2. Find a CPAN mirror here: http://mirrors.cpan.org/#de
          e.g. http://ftp.hosteurope.de/pub/CPAN/
   3. on the internet machine:
          $ minicpan -l /path/to/local/cpan/mirror -r http://ftp.hosteurope.de/pub/CPAN/
   4. Copy /path/to/local/cpan/mirror to the non-internet machine (or mount it)
   5. On the non-internet machine add the directory to CPAN's search path:
          $ cpan
              cpan shell -- CPAN exploration and modules installation (v1.xxxx)
            cpan> o conf urllist unshift file:///path/to/local/cpan/mirror
            cpan> o conf commit
            commit: wrote /home/user/.cpan/CPAN/MyConfig.pm
   6. Install as usual on the non-internet machine.

要更新您的CPAN镜像,请转到您的互联网计算机,然后重复步骤3和4.

To update your CPAN mirror go to your internet machine and repeat steps 3 and 4.

参考文献:

  • http://www.perlmonks.org/?node_id=590386
  • http://www.cpan.org/misc/how-to-mirror.html
  • http://search.cpan.org/~rjbs/CPAN-Mini-1.111016/lib/CPAN/Mini.pm
  • http://search.cpan.org/~rjbs/CPAN-Mini-1.111016/bin/minicpan

一些笔记

尽管CPAN表示初始镜像只会占用大约1 GB的空间,但将需要大约3.5 GB的空间.我认为他们的文档在这方面已经过时了.

Although CPAN says the initial mirror will only occupy around 1 GB it will need around 3.5 GB. I think their documentation is outdated in this regard.

镜像最初将包含CPAN上 all 模块的最新版本.每次更新镜像时,都会下载最新版本(将旧版本保留在磁盘上),因此随着新版本的到来,镜像将随着每个更新增长.

The mirror will initially contain the latest versions of all modules on CPAN. Every time you update your mirror the then-latest versions will be downloaded (leaving the old versions on your disk), so the mirror will grow with each update as new versions arrive.

我将镜像更新了三到四次,现在它有3.9 GB.

I updated my mirror three or four times and it now has 3.9 GB.

这篇关于如何手动(即脱机)手动安装Redis perl库以及从何处获得要安装的所有依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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