国内的开源镜像站有很多,下面分别以阿里、网易、清华为例,更换CentOS系统的yum源。

一、进入阿里镜像站:https://developer.aliyun.com/mirror

如何更换CentOS7的yum源

点击“centos”,根据官网文档,选择对应系统版本的yum源

1、备份原来的yum源

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

2、下载CentOS 7的yum源

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

3、下载epel扩展源

点击“epel”,根据官网文档,选择对应系统版本的yum源

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

4、清理缓存,生成新缓存

yum clean all

yum makecache

二、进入网易镜像站:http://mirrors.163.com

点击使用帮助列的“centos使用帮助”

如何更换CentOS7的yum源

根据官网文档的“使用说明”操作即可。

如何更换CentOS7的yum源

三、清华镜像站:https://mirrors.tuna.tsinghua.edu.cn

点击右侧的“使用帮助”

如何更换CentOS7的yum源

在左侧选择“centos”,根据CentOS镜像使用帮助操作即可。

如何更换CentOS7的yum源

 

相关文章:

  • 2021-11-26
  • 2021-05-29
  • 2022-01-17
  • 2021-10-02
  • 2021-09-27
  • 2022-12-23
  • 2021-12-15
  • 2021-11-30
猜你喜欢
  • 2022-02-03
  • 2022-12-23
  • 2021-08-01
  • 2021-12-12
  • 2022-12-23
相关资源
相似解决方案