为什么不用aliyun,和网易云,因为镜像被删除了,少有的sohu还保留
更改 /etc/yum.repo.d/CentOS-Base.repo,内容如下:
[base]
name=Base
baseurl=http://mirrors.sohu.com/centos/6/os/x86_64/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
[updates]
name=Updates
baseurl=http://mirrors.sohu.com/centos/6/updates/x86_64/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
[extras]
name=Extras
baseurl=http://mirrors.sohu.com/centos/6/extras/x86_64/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
[centosplus]
name=centosplus
baseurl=http://mirrors.sohu.com/centos/6/centosplus/x86_64/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
[contrib]
name=Contrib
baseurl=http://mirrors.sohu.com/centos/6/contrib/x86_64/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
[fasttrack]
name=fasttrack
baseurl=http://mirrors.sohu.com/centos/6/fasttrack/x86_64/
gpgcheck=1
gpgkey=http://mirrors.sohu.com/centos/RPM-GPG-KEY-CentOS-6
保存,执行如下命令:
yum clean all
yum makecache