solve issue with outdated centos 7 for Issable PBX Article
solve issue with outdated centos 7 for Issable PBX
Description
On July 1 st 2024 CentOS 7 is End of Life and the CentoS team has removed their mirrors from the internet. They can still be accessed via vault.centos.org. Without updating the repository URLs, packages will be unable to be updated or validated, resulting in the error above.
IMPORTANT: Using the CentOS vault repository IS NOT to be used (or staying on CentOS 7 for any longer than is required to migrate to a new server. Packages provided by the vault repository do not get any updates. This means that the so(tware installed (rom the Vault repository will have unpatched security vulnerabilities and other defects.
Workaround
cPanel has released the following autofixer to enable the CentoS 7 Vault repository automatically for you:
/scripts/autorepair centos7_base_repo_is_no_more
Note: The above script will only correct servers with the repo file set as CentOS-Base.repo, systems using custom repositories will need to edit the repo file to use vault.centos.org using the manual steps below.
Manual Steps:
If you are using a custom CentoS 7 base repository, then please follow these manual steps:
- Copy the current CentOS 7 repository file so that you can revert the changes if necessary:
cp -v /etc/yum.repos.d/CentOS-Base.repo{,-backup}
Note: Your CentOS 7 base repository may have a different name. The above filename "CentOS-Base.repo" is only used as an example.
- Edit the /etc/yum.repos.d/CentOS-Base.repo file using a command line text editor
- Paste in the following configuration:
[base]
name=CentOS-$releasever - Base baseurl=https://vault.centos.org/7.9.2009/os/$basearch gpgcheck=1
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 gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Cent0S-7
#additiona1 packages that may be useful [extras]
name=CentOS-$releasever - Extras baseurl=https://vau1t.centos.org/7.9.2009/extras/$basearch gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additiona1 packages that extend functionality of existing packages [centosplus]
name=CentOS-$releasever - Plus baseurl=https://vault.centos.org/7.9.2009/centosplus/$basearch gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Cent0S-7
- Save the file and exit
- Run the following commands:
yum clean all && yum makecache