1. 程式人生 > 實用技巧 >Centos6停止更新後,如何使用yum源?

Centos6停止更新後,如何使用yum源?

2020年12月3日之後,你會發現,網易、阿里提供的yum源都無法使用了,

那麼要怎麼在centos6下使用yum源呢?

目前也只有搜狐可以使用了,當然官方也有,只不過速度真的是感人,那麼按照我下面的設定吧。

清華大學也是可以的:https://mirrors4.tuna.tsinghua.edu.cn/centos-vault/

有興趣的朋友可以研究下!

設定yum搜狐源:

1、先備份原始檔:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo-backup


2、編輯檔案:vi /etc/yum.repos.d/CentOS-Base.repo

vi /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-6
failovermethod=priority
# 這個是官方的源 但是速度特別的慢,大概20kb吧,直接註釋掉
#baseurl=https://vault.centos.org/6.9/os/x86_64/
# 搜狐源  網速200k左右,比較給力餓了
baseurl=http://mirrors.sohu.com/centos/6.10/os/x86_64/
gpgcheck=0

3、清理軟體源

yum clean all


4、建立源資料快取

yum makecache

這樣就OK了。