CentOS 7 has reaced End of Life on 30th June 2024. The implications of this event means that there are no new updates for this release and the packages have been move to vault mirrors.
Since new VM versions of CentOS 7 are not publicly approved by AWS or Azure, as a customer, you are welcome to ask for a private image that fixes the repos inside the VM and/or get the latest Python 3 version compiled for you.
You are also welcome to use the following instructions to move the the vault mirrors:
Disable current repos:
sudo yum-config-manager --disable \*
or, if yum-config-manager is not found:
sudo sed -i 's/enabled=.*/enabled=0/' /etc/yum.repos.d/*
sed -i '/gpgcheck=[01]/{N;/\nenabled=0/!s/\n/\nenabled=0\n/}' /etc/yum.repos.d/CentOS-Base.repo
Add vault repos:
cat <<EOF | sudo tee -a /etc/yum.repos.d/CentOS-Vault.repo
[base-vault]
name=CentOS-$releasever - Base - Vault
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
[updates-vault]
name=CentOS-$releasever - Updates - Vault
baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=1
[extras-vault]
name=CentOS-$releasever - Extras - Vault
baseurl=http://vault.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
EOF
Refresh yum cache:
sudo yum clean all
sudo rm -rf /var/cache/yum/
A better option would be to migrate to one of the Rocky Linux or AlmaLinux using the following procedures:
IMPORTANT: Test these instructions on a test VM before applying them to production. Rinne Labs takes no responsibility for any loss incurred on production environments due to lack of preparations.