今天安装zabbix的监控mysql插件MPM时,需要先安装好perl环境。
perl -MCPAN -e shell
span> install File::which
span> install Bundle::LWP
span> install Digest::SHA1
span> install DBD::mysql
span> install Time::HiRes
span> install Crypt::SSLeay
但是问题是,我需要用rpm包来安装,因为内网部署 链接不到外网。 其他的包都能找到,但是发现Bundle::LWP的rpm包找不到。
后来知道可以用 yum whatprovides 来确定模块需要的rpm包
yum whatprovides 来定位需要的rpm包
[root@kfpanda Packages]# yum whatprovides */Bundle*L*
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
1:perl-LDAP-0.40-1.el6.noarch : LDAP Perl module
Repo : C6.0-base
Matched from:
Filename : /usr/share/perl5/Bundle/Net/LDAP.pm
Filename : /usr/share/man/man3/Bundle::Net::LDAP.3pm.gz
perl-libwww-perl-5.833-2.el6.noarch : A Perl interface to the World-Wide Web
Repo : C6.0-base
Matched from:
Filename : /usr/share/perl5/Bundle/LWP.pm
Filename : /usr/share/man/man3/Bundle::LWP.3pm.gz
perl-libwww-perl-5.833-2.el6.noarch : A Perl interface to the World-Wide Web
Repo : installed
Matched from:
Filename : /usr/share/perl5/Bundle/LWP.pm
Filename : /usr/share/man/man3/Bundle::LWP.3pm.gz
从上面看Bundle::LWP需要的是perl-libwww-perl-5.833-2.el6.noarch包