CentOS7 Post-EOL usage

CentOS7 Post-EOL usage

CentOS7 is the Linux I have to use on some of my projects. Starting from June, 30, 2024 it enters post-EOL phase. This means regular repositories: mirrorlist.centos.org won’t work anymore. And you'll have to switch to vault.centos.org repos. But, with the CentOS7 there is another issue - expired certificates, so it took me morning to understand the root case and solve the problem.

Before proceeding with this, please be aware, that RedHat suggests you to upgrade to never release, and assure you know you don't want it. Or, at least, you have some important reason not to do this.

Your first step is about making backup of your existing repos configuration:

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

After this, feel free to replace the /etc/yum.repos.d/CentOS7-Base with the following content:

[base]
name=CentOS-$releasever - Base
baseurl=https://vault.centos.org/7.9.2009/os/$basearch
gpgcheck=1
sslverify=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates 
[updates]
name=CentOS-$releasever - Updates
baseurl=https://vault.centos.org/7.9.2009/updates/$basearch
sslverify=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://vault.centos.org/7.9.2009/extras/$basearch
sslverify=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://vault.centos.org/7.9.2009/centosplus/$basearch
sslverify=0
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7        

Here you did three things, comparing to the original configuration:

  1. Switched from mirrorlist.centos.org to vault.centos.org so no more fast mirrors.
  2. Switched from http to https, and you are more secured with the expired certificate.
  3. Lessen you security, you established in the previous point by providing sslverify option. There is no way to get new certificate, but... upgrade to newer OS.

Finally run

yum clean all && yum makecache        

Now run relax and feel free to use outdated and unsupported OS.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了