Introduction

 

CentOS 6 is now EOL and the base repository is no longer available via normal means. Please see the following for more detailed information:

 

All CentOS 6 users should migrate to a new, up-to-date server as soon as possible. Please see the following article for more information on migrating your cPanel server to a new cPanel server:

 

There may be some situations where you cannot migrate to a new server without first being able to install software via yum. cPanel provides the following autofixer to enable the CentOS vault repository automatically for you:

# /scripts/autorepair centos6_base_repo_is_no_more

 

Although if your server has a modified base repository file, this autofixer will not make changes to it. If you still need to use the Vault repository and the above autofixer does not work, you may use the following procedure to manually enable the vault repository.

 

IMPORTANT: Using the CentOS vault repository IS NOT to be used for staying on CentOS 6 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 software installed from the Vault repository will have unpatched security vulnerabilities and other defects.

 

Also please keep in mind that this is a task that is best handled by a systems administrator with the skills, training, and experience required to do so for you. cPanel support is not able to provide system administration services such as manually modifying repository configurations. This guide is provided as a courtesy.

 

Procedure

 

1. Login to the server via SSH as the root user, or open the Terminal from WHM as the root user

2. Move your existing repository out of the way so that you can revert the changes if necessary:

mv -v /etc/yum.repos.d/CentOS-Base.repo{,-backup}

3. Create a new empty repository file: 

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

5. Open this newly created file with the text editor of your choice

6. Paste the following configuration into the file:

[base]
name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[updates]
name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[extras]
name=CentOS-$releasever - Extras
baseurl=http://vault.centos.org/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1
metadata_expire=never

[contrib]
name=CentOS-$releasever - Contrib
baseurl=http://vault.centos.org/$releasever/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never

[centosplus]
name=CentOS-$releasever - CentOSPlus
baseurl=http://vault.centos.org/$releasever/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0
metadata_expire=never

7. Clear the yum cache and then remake it:

yum clean all
yum makecache


Then you should be able to install packages via yum, although do note that this will NOT provide your server with updates to fix defects or security vulnerabilities as is mentioned earlier in this article.

 

If you have trouble getting these steps to work, you'll need to reach out to a systems administrator with the skills, training, and expertise required to troubleshoot the issue for you. If you're not sure where to find a systems administrator, you can start your search here: