CentOS 6 Yum source update

Official announcement: CentOS 6 stops all updates

CentOS 6 has entered EOL (Reaches End of Life) with the end of November 2020. Therefore, on December 2, 2020, CentOS officially stopped all updates to CentOS 6 and took off the shelves, including all official CentOS6 sources. At present, CentOS6 sources such as Alibaba, 163 and Tsinghua are no longer available.

Explanation of the following official redme documents:

This directory (and version of CentOS) is deprecated. Please see this FAQ concerning the CentOS release scheme:


Please keep in mind that 6.0, 6.1, 6.2, 6.3, 6.4 , 6.5, 6.6, 6.7, 6.8 , 6.9 and 6.10 no longer get any updates, nor any security fix's. The whole CentOS 6 is dead and shouldn't be used anywhere at all

  • CentoS 6 stop maintenance update date November 30, 2020
  • CentOS 7 stop maintenance update date: June 30, 2024
  • CentOS 8 stop maintenance update date: May 31, 2029

Official address: https://wiki.centos.org/About/Product

Therefore, you need to pay attention to switching and upgrading at these time nodes when you get relevant versions in enterprise production. Otherwise, the following errors may occur

# yum install lszrz
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
http://mirrors.163.com/centos/6.9/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
To address this issue please refer to the below knowledge base article 


If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

Therefore, the 404 error in the above figure will be prompted when executing the Yum command on the CentOS6 system.

If there are still some systems that have not come, upgraded or switched, or if CentOS6 needs to be used for some reasons, there must be a solution.

You can use vault centos. Org as update source!!!

  • CentOS official: http://vault.centos.org/
  • Alibaba cloud image: http://mirrors.aliyun.com/centos-vault/


1. Close fastestmirror

vi /etc/yum/pluginconf.d/fastestmirror.conf
#modify parameters

2. Rename the original source and develop good backup habits

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

3. Replace source

#Replace with official Vault source
wget -O /etc/yum.repos.d/CentOS-Base.repo https://static.lty.fun/%E5%85%B6%E4%BB%96%E8%B5%84%E6%BA%90/SourcesList/Centos-6-Vault-Official.repo

#Replace with alicloud Vault image
wget -O /etc/yum.repos.d/CentOS-Base.repo https://static.lty.fun/%E5%85%B6%E4%BB%96%E8%B5%84%E6%BA%90/SourcesList/Centos-6-Vault-Aliyun.repo

If the system has no wget command and cannot download the file, you can use the content in the face address on the to directly edit the original Yum source file and replace each other.

With the update and development of the times and the progress of science and technology, no matter what kind of software, it will withdraw from the stage of history. This is the law of the survival of all things, updating and iterating, or being eliminated by the times.


Finally, I suggest you upgrade to the new version as much as possible. Although the above operations can use relevant functions, with the official no longer maintaining and updating this version, it may also indicate that there will be some vulnerability risks in the future. Therefore, try to upgrade to a new version unless necessary.


Reprinted to https://blog.csdn.net/qq_25854057/article/details/110959319

Tags: Linux

Posted by dhiren22 on Sat, 16 Apr 2022 02:21:50 +0930