更改Linux镜像源

2019-12-26  本文已影响0人  QZH_2019

1. 备份原来的镜像文件

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2.下载阿里云镜像repo

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo

3. 清除缓存命令

yum clean all
yum makecache
上一篇 下一篇

猜你喜欢

热点阅读