centos 更换yum源
centos源更换为,163或者阿里的。
1、首先备份
mv /etc/yum.repos.d/Centos-Base.repo /etc/yum.repos.d/Centos-Base.repo.backup
2、下载repo文件到目录下
cd /etc/yum.repos.d
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
3、yum clean all //清除缓存
yum makecache //生成新的缓存
163和aliyun镜像:
http://mirrors.163.com
http://mirrors.163.com/.help/centos.html
https://mirrors.aliyun.com/
https://mirrors.aliyun.com/help/centos

浙公网安备 33010602011771号