Centos7.8 yum下载慢怎么办,更换中国源,更换阿里源

落日映苍穹つ 2022-11-12 11:53 662阅读 0赞

1,备份一下原本的yum源:

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

2,下载阿里云的yum源【我下的是CentOS7的,如果需要其他版本,那么只需要将下面的7改成5或6即可】:

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

3,之后运行给install生成缓存

  1. yum makecache

4.更新下yum

yum update

发表评论

表情:
评论列表 (有 0 条评论,662人围观)

还没有评论,来说两句吧...

相关阅读

    相关 Centos7 更换yum

    背景   Centos 7默认的yum源网络不好使,所以更改yum源为阿里云 解决方案          命令,可选两种方式均可以,此种命令更换源为阿里云    一