CentOS7更换yum国内源
2018-04-16 本文已影响0人
wild_w0lf
先来备份一下yum源配置文件
cp /etc/yum.repos.d/Cent-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下载yum的源配置文件,放入/etc/yum.repos.d/,以阿里云源为例
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
运行yum makecache生成缓存
yum makecache
更新系统
yum -y update
就此,更换源告一段落,如果有什么问题,可以尝试万能的reboot