Centos7更换yum源为阿里yum源

#Step1:下载repository 没有wget命令 就用curl
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo`

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

#Step2:安装epel基础组件源 没有wget命令 就用curl
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

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

yum clean all

yum makecache

猜你喜欢

转载自blog.csdn.net/qq827245563/article/details/132603214