利用阿里云提供的镜像快速更换本地的yum源

 

  打开网页:http://mirrors.aliyun.com/

  从“

文件列表

”找到自己的系统:

Mirror Last update Help
CPAN 2015-07-15 15:36:50  
CRAN 2015-07-16 05:11:52  
CTAN 2015-07-12 03:51:20  
apache 2015-07-16 02:06:40  
archlinux 2015-07-16 00:51:24 help
centos 2015-07-16 06:20:51 help
cygwin 2015-07-16 02:00:05 help
debian 2015-07-16 08:07:31 help
debian-backports 2015-07-16 08:50:04 help
debian-cd 2015-07-15 01:05:05  
debian-security 2015-07-16 08:30:55 help
deepin 2015-07-16 03:00:06 help
dotdeb 2015-07-16 01:52:20 help
epel 2015-07-16 07:18:55 help
fedora 2015-07-15 02:24:48 help
freebsd 2015-07-16 03:44:27 help
gentoo 2015-07-14 00:42:09 help
gentoo-portage 2015-07-16 04:04:06 help
gentoo-portage-prefix 2015-01-28 06:09:50  
kali 2015-06-26 03:50:35  
kali-security 2015-06-26 02:22:01  
linux-kernel 2015-07-16 04:06:53  
macports 2015-07-15 03:02:24  
mariadb 2015-07-15 15:32:35  
mongodb 2015-07-16 02:35:57  
oldubuntu-releases 2015-07-16 02:30:08  
opensuse 2015-07-15 13:29:03 help
packman 2015-06-03 02:26:11 help
pypi 2015-07-16 02:49:37 help
raspbian 2015-07-15 02:59:32 help
rpmfusion 2015-07-16 07:22:45  
rubygems 2015-07-15 03:08:28 help
sabayonlinux 2015-07-14 01:04:50  
scientificlinux 2015-07-15 12:20:55 help
ubuntu 2015-07-16 07:00:23 help
ubuntu-releases 2015-07-16 02:24:21  
zabbix 2015-07-16 02:40:05


单击help进入(如我这里当今centos 的help):


CentOS

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生成缓存



根据上述的描述操作即可快速完成yum源更换。

 

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值