美文网首页
Centos7 更换国内的yum源

Centos7 更换国内的yum源

作者: jeffrey_hjf | 来源:发表于2019-06-22 21:52 被阅读0次

1、下载wget工具

yum install –y wget

2、进入yum源配置文件所在文件夹

cd /etc/yum.repos.d/

3、备份本地yum源

mv CentOS-Base.repo CentOS-Base.repo_bak

4、获取国内yum源(阿里、163二选一)

阿里云:

wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

163:

wget -O CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

5、清理缓存、重建缓存、升级Linux系统
清理yum缓存:

yum clean all

重建缓存:

yum makecache

升级Linux系统:

yum -y update

相关文章

网友评论

      本文标题:Centos7 更换国内的yum源

      本文链接:https://www.haomeiwen.com/subject/lrqbqctx.html