Linux CentOS yum 更换源

Reference: blog.csdn.net/weixin_53502673/article/details/124869083

1、yum源进行备份
进入到yum源的配置文件中
执行命令如下:cd /etc/yum.repos.d
将yum源进行备份:mv Centos-Base.repo Centos-Base.repo.bak
2、获取阿里的yum源配置文件
执行命令:wget -O Centos-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、对yum源生成缓存
执行命令:yum makecache
4、更新yum源
执行命令:yum -y install update
执行完成之后就可以使用yum源了,到此yum源就更换成功了。

你可能感兴趣的:(Linux,linux,centos)