by Devin Yang

建立于: 3年前 ( 更新: 3年前 )

有些地方或许还存在一些老旧进程,只能跑旧的系统。
但又希望能运行及安装一些想要的包,
您或许可以试这招

请注意,如果这个系统对您很重要,请自行评估,建议您是Docker环境,并且有备份了image才可尝试。

打开文件

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

换掉下方三个内容

[base]
[updates]
[extras]

内容如下:

[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

清除

yum clean all

更新

yum update

Tags: linux system config

Devin Yang

文章内容无法一一说明,如果您有什么不了解处,欢印提问哦:)

No Comment

Post your comment

需要登入才可留言!

类似文章


linux

ubuntu找不到add-apt-repository命令

ubuntu找不到add-apt-repository命令

linux

如何检查apache加载并激活了那些modules?

如何检查apache加载并激活了那些modules?

linux

如何安装monitor工具htop到CentOS上

Htop是一个基於Linux的免费(GPL)基於ncurses的进程monitor工具。 他类似於top,但允许您垂直和水平滚动,所以您可以看到运行在系统完整的命令行, 以及可将它们视为进程树,选择多个进程并进行操作。