How does CentOS 8 EOL switch sources ?

Background Information

Dec 31, 021 CentOS 8 EOL. According to community rules, the source address of CentOS 8 http://mirror.centos.org/centos/8/ has been removed, and the source of CentOS 8 has been removed from third-party mirror sites. Aliyun’s sources http://mirrors.cloud.aliyuncs.com and http://mirrors.aliyun.com also cannot be synced to CentOS 8’s sources.

An example of the error is shown in the figure below:

Steps

1. Backup previous repo files

1
rename '.repo' '.repo.bak' /etc/yum.repos.d/*.repo
SHELL

2. Download the latest repo file

1
2
wget https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo -O /etc/yum.repos.d/Centos-vault-8.5.2111.repo
wget https://mirrors.aliyun.com/repo/epel-archive-8.repo -O /etc/yum.repos.d/epel-archive-8.repo
SHELL
1
2
sed -i 's/mirrors.cloud.aliyuncs.com/url_tmp/g'  /etc/yum.repos.d/Centos-vault-8.5.2111.repo &&  sed -i 's/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo && sed -i 's/url_tmp/mirrors.aliyun.com/g' /etc/yum.repos.d/Centos-vault-8.5.2111.repo
sed -i 's/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/epel-archive-8.repo
SHELL

4. Recreate the cache

1
yum clean all && yum makecache
SHELL

How does CentOS 8 EOL switch sources ?
https://www.hardyhu.cn/2022/02/13/How-does-CentOS-8-EOL-switch-sources/
Author
John Doe
Posted on
February 13, 2022
Licensed under