[root@test_web1 ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.lFLueF: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
[root@test_web1 ~]# yum install perl-IO-Socket-SSL perl-DBD-MySQL perl-Time-HiRes socat nc libaio rsync -y
Loaded plugins: fastestmirror
Determining fastest mirrors
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again #这里报错了
查看了下resolv.conf文件和yum clean all之后还是不行,那么就查看一下epel的yum源配置文件,可能是https地址无法连接,注释掉https的地址,打开http地址试试:
vim /etc/yum.repos.d/epel.repo
如下图:
再次尝试yum安装:
[root@test_web1 ~]# yum install perl-IO-Socket-SSL perl-DBD-MySQL perl-Time-HiRes socat nc libaio rsync -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.pubyun.com
* extras: mirrors.pubyun.com
* updates: mirrors.163.com
base | 3.7 kB 00:00
base/primary_db | 4.6 MB 00:15
epel | 4.3 kB 00:00
epel/primary_db | 5.7 MB 00:19
extras | 3.4 kB 00:00
extras/primary_db | 34 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 3.3 MB 00:11
Setting up Install Process
Package rsync-3.0.6-12.el6.x86_64 already installed and latest version
................
发现已经可以正常使用了