安装Linux/Uuix平台代理的客户端
[root@localhost ~]# yum install -y perl-XML-Simple perl -Compress-Zlib perl-Net-IP perl-Digest-MD5 perl-Net-SSLeay perl-Crypt-SSLeay perl-XML-SAX perl- XML-LibXML Perl-Proc-Daemon perl-PID-File
安装过程提示无法yum到包
Setting up Install Process
No package Perl-Proc-Daemon available.
No package perl-PID-File available.
Package perl-Digest-MD5 is obsoleted by perl, trying to install 4:perl-5.8.8- 32.el5_5.2.i386 instead
Resolving Dependencies
直接运行以下命令:
[root@localhost ~]# perl -MCPAN -e 'install Proc::Daemon'
注意:第一次运行perl – MCPAN命令来实现自动安装模块,会提示安装CPAM,一路回车下去,直接最后设置镜像,再选择镜像地址就 OK
(Comprehensive Perl Archive Network(CPAN),CPAN 可以以两种方式工作:通过交互 shell 或通过一系列函数,可以将这些函数用作范围较广泛的基于 Perl 脚本的解决方案的一部分。最简单地说,可 以使用 CPAN,只通过输入 perl -MCPAN -e "install modulename" 来安装模块,其中 modulename是要安装的包、绑定或完整 Perl 模块的名称)
[root@localhost ~]# perl -MCPAN -e 'install Proc::PID::File'
从镜像点下载下来的包会保存在以下目录
[root@localhost ~]# ll /root/.cpan/build/
总计 8
drwxr-xr-x 4 root root 4096 03-01 01:22 Proc-Daemon-0.07
drwxr-xr-x 2 500 users 4096 03-01 01:24 Proc-PID-File-1.27
也 可以从http://search.cpan.org/modlist/Perl6下载到无法yum到的包,手动安装.tar包
[root@localhost ~]# cd /root/soft/
[root@localhostsoft]#Wget http://launchpad.net/ocsinventory-unix-agent/stable-2.0/2.0rc2/+download/Ocsinventory-Agent- 2.0rc2.tar.gz
速度很慢!要有点耐心哦
[root@localhost soft]# tar -zxvf Ocsinventory- Agent-2.0rc2.tar.gz
[root@localhost soft]# cd Ocsinventory-Agent-2.0rc2
[root@localhost Ocsinventory-Agent-2.0rc2]# ll
总计 436
-rw-r--r-- 1 1000 1000 289 02-12 04:27 AUTHORS
-rw-r--r-- 1 1000 1000 35114 02-12 04:27 Changes
drwxr-xr-x 2 1000 1000 4096 02-12 04:29 contrib
drwxr-xr-x 7 1000 1000 4096 02-12 04:29 etc
drwxr-xr-x 3 1000 1000 4096 02-12 04:29 inc
drwxr-xr-x 3 1000 1000 4096 02-12 04:29 lib
-rw-r--r-- 1 1000 1000 17987 02-12 04:27 LICENSE
-rw-r--r-- 1 1000 1000 3618 02-12 04:27 Makefile.PL
-rw- r--r-- 1 1000 1000 12728 02-12 04:29 MANIFEST
-rw-r--r-- 1 1000 1000 291449 02-12 04:27 memconf
-rw-r--r-- 1 1000 1000 646 02-12 04:29 META.yml
-rwxr-xr-x 1 1000 1000 8773 02-12 04:27 ocsinventory-agent
-rwxr-xr-x 1 1000 1000 10655 02-12 04:27 postinst.pl
-rw-r--r-- 1 1000 1000 5301 02-12 04:27 README
drwxr-xr-x 4 1000 1000 4096 02-12 04:29 resources
-rw-r--r-- 1 1000 1000 0 02-12 04:29 run-postinst
-rw-r--r-- 1 1000 1000 1474 02-12 04:27 THANKS
drwxr-xr-x 3 1000 1000 4096 02-12 04:29 tools
[root@localhost Ocsinventory-Agent-2.0rc2]# perl Makefile.PL
Please install Compress::Zlib if you use an OCS server prior 1.02.
Please install Crypt::SSLeay if you want to use SSL.
Please install Net::SSLeay if you want to use the software deployment.
Please install nmap or ipdiscover if you want to use the network discover feature.
Net::IP is strongly recommended since it's required to retrieve network information
Please install Proc::Daemon and Proc::PID::File if you want to use the daemon monde.
Checking if your kit is complete...
Looks good
Warning: prerequisite ExtUtils::MakeMaker 6.42 not found. We have 6.30.
Warning: prerequisite LWP 0 not found.
Warning: prerequisite XML::Simple 0 not found.
Writing Makefile for Ocsinventory::Agent