by Devin Yang
(This article was automatically translated.)

Published - 1 year ago ( Updated - 1 year ago )

There may still be some old programs in some places, which can only run the old system.
But want to be able to execute and install some desired packages,
You may try this trick

Please note that if this system is important to you, please evaluate it yourself. It is recommended that you are in a Docker environment and have a backup image before trying it.

Open file

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

Replace the three contents below

[base]
[updates]
[extras]

The content is as follows:

[base]
name=CentOS-$releasever-Base
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=https://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

# released updates
[updates]
name=CentOS-$releasever-Updates
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=https://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

# additional packages that may be useful
[extras]
name=CentOS-$releasever-Extras
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=https://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

Clear

yum clean all

update

yum update

Tags: linux system config

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


linux

Remove the Linux Kernel that is not used by the old version on Ubuntu

This page describes how I removed the old version of Linux Kernel taking up space on ubuntu.

linux

Load the environment variables of .env to the system

Load the environment variables of .env to the system

linux,cli

How to use the date command to display yesterday's date

The instructions are different on MacOS or Linux, but achieve the same effect. Let's see how to display yesterday's date with the date command.