CentOS modifies yum source to domestic source

1. Backup

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

2. Download the new CentOS-Base.repo to /etc/yum.repos.d/

CentOS 7

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

CentOS 8

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

3. Generate cache

1
yum makecache

CentOS modifies yum source to domestic source
https://www.hardyhu.cn/2022/01/26/CentOS-modifies-yum-source-to-domestic-source/
Author
John Doe
Posted on
January 26, 2022
Licensed under