centos 修改为阿里云epel源

epel源是centos的扩展源.添加阿里云源方法如下:

RHEL 7  (CentOS 7)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

RHEL 6  (CentOS 6)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo

RHEL 5  (CentOS 5)
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo

没有wget的可以用curl:

RHEL 7  (CentOS 7)
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

RHEL 6  (CentOS 6)
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo

RHEL 5  (CentOS 5)
curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo

你可能感兴趣的:(运维,Linux)