CentOS 7 reached its CentOS 7 reached its End-of-Life (EOL) on June 30, 2024.
After this date, CentOS no longer provides official updates, patches, or support.
However, you can still maintain your system’s security and receive community-based updates using Vault and Remi repositories.
Before making any changes, create a backup of the existing CentOS repository configuration:
cp -v /etc/yum.repos.d/CentOS-Base.repo{,-backup}
Note: the filename may differ on your system, adjust as needed.
Open the file with a text editor such as nano:
sudo nano /etc/yum.repos.d/CentOS-Base.repo
Replace its contents with:
[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
[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-CentOS-7
[extras]
name=CentOS-$releasever - Extras
baseurl=https://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[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-CentOS-7
Save with Ctrl + O, then Enter, and exit with Ctrl + X.
yum clean all && yum makecache && yum update -y
This ensures your CentOS 7.9 system uses the Vault repositories for updates.
To use the Remi Repository — which provides newer versions of PHP (7.4 – 8.3) and other modern packages — you must first install EPEL and yum-utils:
yum install epel-release yum-utils -y
Then enable EPEL:
yum-config-manager --enable epel
Add the official Remi repository maintained at rpms.remirepo.net:
rpm -Uvh https://rpms.remirepo.net/enterprise/remi-release-7.rpm
You can now list and enable the desired repositories:
yum repolist all | grep remi
For example, to enable PHP 8.1 packages from Remi:
yum-config-manager --enable remi-php81
yum update -y
If you need PHP 8.2 or 8.3, replace php81 with php82 or php83 accordingly.
yum repolist enabled
You should now see both vault.centos.org and remi repositories active.
The fact that CentOS 7.9 has reached End-of-Life (EOL) demands serious attention. While this guide provides an advanced and practical workaround, it should not be viewed as a long-term production strategy.
For future stability, consider migrating to CentOS Stream 9, AlmaLinux 9, Rocky Linux 9, or Ubuntu 25.10, all of which provide extended lifecycle support and continuous security maintenance.
Using both the CentOS Vault and the Remi repository requires careful validation. Some packages may no longer be actively maintained or could present dependency incompatibilities with existing systems.
For instance, enabling Remi to upgrade PHP can introduce dependency changes that might affect older control panels or legacy web stacks.
The guide also assumes a stable environment but does not explicitly emphasize comprehensive backup and rollback procedures, these should be mandatory before implementing any repository changes.
Finally, it’s important to note that not all packages in the Vault receive CVE-level patching or full security coverage. While Vault repositories preserve historical package versions, they do not provide active vulnerability management.
By combining the CentOS Vault archives with the Remi repository, you can:
This hybrid configuration is highly recommended for developers maintaining legacy environments, especially cPanel / DirectAdmin servers that still rely on CentOS 7 and need continued functionality with updated packages.