centos7配置yum国内镜像

1、cd 到yum源文件所在位置

cd /etc/yum.repos.d

2、备份CentOS-Base.repo源文件

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

3、下载阿里云yum源配置文件

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

4、清理yum缓存

yum clean all

5、生成新的缓存

yum makecache

6、更新yum源

yum update

借鉴文章地址:https://blog.csdn.net/qq_52545155/article/details/137229782

posted @ 2024-10-10 11:21  槑孒  阅读(466)  评论(0)    收藏  举报