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

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

阿里云是最近新出的一个镜像源。得益与阿里云的高速发展,这么大的需求,确定会推出本身的镜像源。
阿里云Linux安装镜像源地址:http://mirrors.aliyun.com/*缓存

CentOS系统更换软件安装源

第一步:备份你的原镜像文件,以避免出错后能够恢复。

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

第二步:下载新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS 5阿里云

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

CentOS 6it

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

Centos7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo软件

第三步:运行yum makecache生成缓存

yum clean all下载

yum makecacheyum

相关文章
相关标签/搜索