centos7配置yum國內映象

槑孒發表於2024-10-10

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

相關文章