centos7更换源

返回
Author Avatar
钢翼
2024-09-29
编程
62

CentOS7更换镜像源

1、先安装wget

yum install -y wget

2、打开阿里镜像http://mirrors.aliyun.com/ 点击,帮助,查看详情:

3、下载CentOS 7的对应的repo文件

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#或者
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

4、更新镜像源

yum clean all

yum makecache

yum -y update

原文链接:https://blog.csdn.net/masound/article/details/140123479