2020年12月3日 开始国内的centos6 yum都失效了 如今只剩搜狐还能用
centos官方也给了一个能够用的yum源 可是网速感人centos
设置yum搜狐源:
一、先备份源文件:mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo-backup
二、编辑文件: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
三、清理软件源
yum clean all
四、创建源数据缓存
yum makecachessh
转自 https://blog.csdn.net/nesrpk/article/details/110789033ide
------------------------------------------------------阿里云
阿里云源
url
操做方法:
spa
在ssh界面执行如下命令便可一键更换yum源为CentOS的Vault源(包括CentOS官方和阿里云的源): .net
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/154blog