by Devin Yang
(This article was automatically translated.)

Published - 2 years ago ( Updated - 2 years 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

Generate ssh key pair without password query

Sometimes it is necessary to generate an ssh key pair for automatic configuration. There is no password query in the command line, and an ssh key pair is generated.

linux

haproxy 1.8.9 compilation record

Record the process of compiling haproxy 1.8.9 under Ubuntu.

linux,macos

PS aux will you?

For Linux system administrators, you must understand the ps aux command. If you want to be a Linux system administrator, or you are a Linux user, you should understand this command. ps is process status For short, anyone can find out what kind of program is running on the system and how the status is executed through this command. I saw some programs that should not appear, maybe the system was hacked and used to mine🥹