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


php,linux

WebShell Function Introduction and Precautions

I suddenly wanted to introduce what is WebShell, so I found one on the Internet. Its functions are quite good. But I still wanted some features, so I spent three nights making some small optimizations for him. If you haven't heard of WebShell yet, take a look at this video. If you like my optimized version, please give me a like, thank you.

config,vim

Chinese environment of Vim on Ubuntu

If Vim is set to Chinese environment, but Ubuntu is not set to zh_TW.UTF-8 during installation, how to install this environment?

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.