(Solved) centos6.5 yum source failure The whole CentOS 6 is dead and shouldn't be used anywhere at all

Learn from https://www.cnblogs.com/binbingg/p/14082610.html
Learn from Ali: https://help.aliyun.com/document_detail/193569.htm

CentOS 6 EOL on November 30, 2020.
The CentOS 6 operating system version has ended its life cycle (EOL), and the Linux community no longer maintains this operating system version.
According to community rules, the source address of CentOS 6 http://mirror.centos.org/centos-6/ has been removed, and the source of CentOS 6 has been removed from the third-party mirror sites.

The whole CentOS 6 is dead and shouldn’t be used anywhere at all 

↑An error indicates that the current source no longer supports Centos6

Solution 1 (Ali):

! ! ! ! important

Description This article mainly describes related operations and configurations in ECS instances. If your server is not an ECS instance, you need to ensure that the server has public Internet access capabilities, and the source address http://mirrors.cloud.aliyuncs.com needs to be replaced with http://mirrors.aliyun.com.
For example, switch the yum source to http://mirrors.aliyun.com/centos-vault/6.10/; switch the epel source to http://mirrors.aliyun.com/epel-archive/6/.

Run the following command to edit the CentOS-Base.repo file.

vim /etc/yum.repos.d/CentOS-Base.repo 

Press i to enter edit mode, modify the following content to switch source.
Please modify according to the different network types of the instance, the specific content is as follows:
VPC type instance of private network

[base]
name=CentOS-6.10
enabled=1
failovermethod=priority
baseurl=http://mirrors.cloud.aliyuncs.com/centos-vault/6.10/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.cloud.aliyuncs.com/centos-vault/RPM-GPG-KEY-CentOS-6

[updates]
name=CentOS-6.10
enabled=1
failovermethod=priority
baseurl=http://mirrors.cloud.aliyuncs.com/centos-vault/6.10/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.cloud.aliyuncs.com/centos-vault/RPM-GPG-KEY-CentOS-6

[extras]
name=CentOS-6.10
enabled=1
failovermethod=priority
baseurl=http://mirrors.cloud.aliyuncs.com/centos-vault/6.10/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.cloud.aliyuncs.com/centos-vault/RPM-GPG-KEY-CentOS-6

Examples of classic network types

[base]
name=CentOS-6.10
enabled=1
failovermethod=priority
baseurl=http://mirrors.aliyuncs.com/centos-vault/6.10/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyuncs.com/centos-vault/RPM-GPG-KEY-CentOS-6

[updates]
name=CentOS-6.10
enabled=1
failovermethod=priority
baseurl=http://mirrors.aliyuncs.com/centos-vault/6.10/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyuncs.comm/centos-vault/RPM-GPG-KEY-CentOS-6

[extras]
name=CentOS-6.10
enabled=1
failovermethod=priority
baseurl=http://mirrors.aliyuncs.com/centos-vault/6.10/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyuncs.com/centos-vault/RPM-GPG-KEY-CentOS-6

After editing, press Esc and enter: wq to save and exit the file.

Run the following command to edit the epel.repo file.

vim /etc/yum.repos.d/epel.repo

Press i to enter edit mode, modify the following content to switch source.
Please modify according to the different network types of the instance, the specific content is as follows:
VPC type instance of private network

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
enabled=1
failovermethod=priority
baseurl=http://mirrors.cloud.aliyuncs.com/epel-archive/6/$basearch
gpgcheck=0
gpgkey=http://mirrors.cloud.aliyuncs.com/epel-archive/RPM-GPG-KEY-EPEL-6

Examples of classic network types

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
enabled=1
failovermethod=priority
baseurl=http://mirrors.aliyuncs.com/epel-archive/6/$basearch
gpgcheck=0
gpgkey=http://mirrors.aliyuncs.com/epel-archive/RPM-GPG-KEY-EPEL-6

After editing, press Esc and enter: wq to save and exit the file.

yum clean all
yum makecache

After the switch is completed, you can use the yum install command to install the required software packages.

Solution 2:

Delete everything in CentOS-Base.repo and add the following content.

[base]
name=CentOS-6
failovermethod=priority
baseurl=https://vault.centos.org/6.9/os/x86_64/
gpgcheck=0

yum clean all
yum makecache

Guess you like

Origin blog.csdn.net/weixin_44578029/article/details/111591282