1. 程式人生 > >centos7 修改yum源為阿裏源

centos7 修改yum源為阿裏源

ews tar rhel 7 vra mirror art http roc article

1.安裝base reop源

   cd /etc/yum.repos.d

接著備份舊的配置文件

   sudo mv CentOS-Base.repo CentOS-Base.repo.bak

下載阿裏源的文件

   sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

2 安裝epel repo源:

epel(RHEL 7)

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

3.清理緩存

yum clean all

4.重新生成緩存

yum makecache

centos7 修改yum源為阿裏源