将Centos的yum源更换为国内的阿里云源

来源:互联网 发布:大数据在运营商的运用 编辑:程序博客网 时间:2024/05/18 13:23

  转载地址:https://yq.aliyun.com/articles/33286


摘要: 阿里云是最近新出的一个镜像源。得益于阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源。阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/CentOS系统更换软件安装源第一步:备份你的原镜像文件,以免出错后可以恢复。

阿里云是最近新出的一个镜像源。得益于阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源。
阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/

CentOS系统更换软件安装源
第一步:备份你的原镜像文件,以免出错后可以恢复。

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
第二步:下载新的CentOS-Base.repo 到/etc/yum.repos.d/
CentOS 5wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repoCentOS 6wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

更改CentOS-Media.repo使其为不生效:
enabled=0

第三步:运行yum makecache生成缓存
yum clean allyum makecache
0 0
原创粉丝点击