Please note that CentOS 8 (non-Stream version) has entered the EOL out-of-service phase in advance, so the mirror has been officially moved. If you are looking for mirrors for these systems, please refer to centos-vault’s help.
This folder only provides CentOS 7 and 8, and the architecture is only
x86_64. If you need an earlier version of CentOS, please refer to the help of centos-vault. If you need other architectures, please refer to the help of centos-altarch.
It is recommended to backup the files in
Then edit the appropriate file in
/etc/yum.repos.d/ to comment out the line beginning
# before the line; and uncomment the line beginning
baseurl= (if it is commented).
For CentOS 7, replace the domain name in this line (eg
For CentOS 8, replace
The above steps can be completed in one step with the following command
# For CentOS 7 sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \ -e 's|^#baseurl=http://mirror.centos.org|baseurl=https://mirror.dimensi.cloud|g' \ -i.bak \ /etc/yum.repos.d/CentOS-*.repo # For CentOS 8 sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \ -e 's|^#baseurl=http://mirror.centos.org/$contentdir|baseurl=https://mirror.dimensi.cloud/centos|g' \ -i.bak \ /etc/yum.repos.d/CentOS-*.repo
Pay attention to the
* wildcards. If you only need to replace the sources in some files, please add or delete them yourself.
Note that if you need to enable some of these repos, you need to change
Finally, update the package cache
sudo yum makecache