In 2020, CentOS8 (7) will replace yum source with Ali source

1. First back up the current configuration file

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

For CentOS8

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

For CentOS7

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

3. Run yum makecache to generate cache

yum makecache

Guess you like

Origin blog.csdn.net/zoollcar/article/details/104297829