配置yum源的步驟
1.可以移除默認的yum倉庫,也就是刪除 /etc/yum.repos.d/底下所有的.repo文件(踢出國外的yum源)
1.配置yum源,找到阿里雲的官方鏡像源地址 https://opsx.alibaba.com/mirror
2.下載centos7的yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.清空舊的yum緩存
yum clean all
4.生成新的yum倉庫緩存(這個緩存來自於阿里雲的yum倉庫,便於加速軟件下載)
yum makecache
5.配置一個第三方的 額外倉庫源 (epel源),這個源的作用是,如果阿里雲源找不到這個軟件,就在這里找
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
