修改Linux安装软件镜像源为阿里云


CentOS系统更换软件安装源:
 
第一步:安装wget。如果你的系统已安装了wget可以直接跳到下一步。
 
[root@local~]#yum install wget
 
第二步:备份你的原镜像文件,避免出错后可以恢复(这里是把原文件重新命名)
 
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
 
第三步:下载新的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.repo
 
CentOS 6:wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
 
第四步:运行yum makecache生成缓存
 
[root@local~]#yum makecache

相关内容

    暂无相关文章