您的位置:首页 > 其它

修改yum的镜像服务器为阿里云

2016-10-28 14:51 197 查看
1、进入阿里云镜像网站

http://mirrors.aliyun.com/

2、选择centos---help



3、安装help里的步骤进行操作

1、备份

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

2、下载新的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
----------------------

CentOS 7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、之后运行

yum makecache

生成缓存

如果 wget 命令无效。那就直接把 http://mirrors.aliyun.com/repo/Centos-6.repo 复制到浏览器下载



-------------

更多的Java,Angular,Android大数据,J2EE,Python数据库Linux,Java架构师,:

http://www.cnblogs.com/zengmiaogen/p/7083694.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: