2020年12月3日 開始國內的centos6 yum都失效了 現在只剩搜狐還能用
centos官方也給了一個可以用的yum源 但是網速感人
設置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
[base]
name=CentOS-6
failovermethod=priority
# 這個是官方的源 但是網上感人
#baseurl=https://vault.centos.org/6.9/os/x86_64/
# 搜狐源 網速200k左右
baseurl=http://mirrors.sohu.com/centos/6.10/os/x86_64/
gpgcheck=012345678
3、清理軟件源
yum clean all
4、建立源數據緩存
yum makecache
轉自 https://blog.csdn.net/nesrpk/article/details/110789033
------------------------------------------------------
操作方法:
在ssh界面執行以下命令即可一鍵更換yum源爲CentOS的Vault源(包括CentOS官方和阿里雲的源):
wget -O /etc/yum.repos.d/CentOS-Base.repo http://files.tttidc.com/centos6/Centos-6.repo
wget -O /etc/yum.repos.d/epel.repo http://files.tttidc.com/centos6/epel-6.repo
yum makecache
http://www.tttidc.com/help/detail/154