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

需要登入才可留言!

類似的文章


Laravel linux

我的行動電腦,安裝Laravel 8在Sony xperia 5 II上

這是我的第一隻Android手機,試裝Laravel完全沒問題耶,基本上我裝了vim及mariadb。 執行sshd後,可以透過8022登入哦,完全是一台行動電腦了:p。 我使用的軟體是Termux...

linux

移除Ubuntu上舊版本用不到的Linux Kernel

這個頁面描述我如何移掉 ubuntu上佔空間的舊版本Linux Kernel。

docker,goaccess,config

phpenv實戰GoAccess即實網站分析(docker版)

在開始前我先說一下,GoAcess也能產出靜態資料只要您有log,因為我覺的即時感覺比較炫,所以本文將專注在GoAccess即時顯示的部分進行介紹。雖然Google Analytics(GA)很好用,但試試另一種GA感覺也很不錯,例如您想了解網站使用者用什麼瀏覽器訪網站。