什么是CPAN(安装NAGIOS使用到)
生活随笔
收集整理的這篇文章主要介紹了
什么是CPAN(安装NAGIOS使用到)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
因為在安裝NAGIOS時候,配置check_snmp_int.pl([url]http://nagios.manubulon.com/faq.html[/url])這些插件的使用時需要配置cpan.所以在這里寫一點小知識.為自己也為同行提供點方便 CPAN是Comprehensive Perl Archive Network的縮寫.。它是一個巨大的Perl軟件收藏庫,收集了大量有用的Perl模塊(modules)及其相關的文件。在互聯網上可在此URL([url]www.cpan.org[/url])找到CPAN。由于CPAN的收藏豐富,使用者甚多,在世界各地都有許多CPAN的鏡站(mirror site)存在。在香港也有CPAN的鏡站,在香港中文大學的域名下([url]http://ftp.cuhk.edu.hk/pub/packages/perl/CPAN/[/url])就有其中的一個。 如何使用CPAN 在DOS命令行鍵入以下指令執行CPAN C:>perl -MCPAN -e shell 第一次進入CPAN時,CPAN將會進行一次配置(configuration)。當配置完成后,就可以利用CPAN來查詢CPAN內的Perl模塊,并且進行安裝。一般操作如下: CPAN> d /bioperl/ 查詢有關bioperl的模塊 CPAN> install?modulename 安裝指定的模塊 如要重新配置CPAN,可先進入CPAN,然后在CPAN命令行(即CPAN>)鍵入以下指令: CPAN>o conf init 以下[url]http://nagios.manubulon.com/[/url]網站上寫到的cpan安裝方法 You don't have Net::SNMP installed, see below How do I install Net::SNMP perl module ? There are 2 ways of doing this 1) By CPAN (best) on command line, as root :?
[your_host]#?perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v1.76)
ReadLine support enabled
cpan>?install Net::SNMP
If it's the first time you run CPAN, it will probably ask you some (simple) questions. CPAN will also ask you to satisfy some dependencies (Crypt::DES, Digest::MD5, etc..). 2) "By hand"
Get the folowings modules (tar.gz format) on?[url]www.cpan.org[/url] - Crypt::DES
- Digest::MD5
- Digest::SHA1
- Digest::HMAC
- Net::SNMP
for each one (you must install Net::SNMP at the end) :?
tar zxf <module>.tar.gz
cd <module>
perl Makefile.pl
make test
make install
本文轉自fine102 51CTO博客,原文鏈接:http://blog.51cto.com/gzmaster/66897,如需轉載請自行聯系原作者
[your_host]#?perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v1.76)
ReadLine support enabled
cpan>?install Net::SNMP
If it's the first time you run CPAN, it will probably ask you some (simple) questions. CPAN will also ask you to satisfy some dependencies (Crypt::DES, Digest::MD5, etc..). 2) "By hand"
Get the folowings modules (tar.gz format) on?[url]www.cpan.org[/url] - Crypt::DES
- Digest::MD5
- Digest::SHA1
- Digest::HMAC
- Net::SNMP
for each one (you must install Net::SNMP at the end) :?
tar zxf <module>.tar.gz
cd <module>
perl Makefile.pl
make test
make install
本文轉自fine102 51CTO博客,原文鏈接:http://blog.51cto.com/gzmaster/66897,如需轉載請自行聯系原作者
總結
以上是生活随笔為你收集整理的什么是CPAN(安装NAGIOS使用到)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: BPMS表单版本控制设计
- 下一篇: iOS编程上获取本地时间以及星期几时间