Centos6.5配置阿里云yum源

很多时候,centos6.5 yum源可能无法访问,报404等等问题,一般情况下我们可以将yum源配置成阿里云的源,当然也可以配置成163的,简单说一下配置成阿里云的:

阿里云镜像源地址:http://mirrors.aliyun.com/

1.备份原文件

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

2.下载CentOS-Base.repo 到/etc/yum.repos.d/

centos6 :

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

(centos 5:wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo)

3.刷新缓存

yum clean all

yum makecache

posted on 2017-02-15 15:30  jessezeng  阅读(2602)  评论(0编辑  收藏  举报

导航