您的位置:首页 > 其它

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

2017-03-03 15:31 369 查看
打开网页:http://mirrors.aliyun.com/

从“

文件列表

”找到自己的系统:

MirrorLast updateHelp
CPAN2015-07-15 15:36:50
CRAN2015-07-16 05:11:52
CTAN2015-07-12 03:51:20
apache2015-07-16 02:06:40
archlinux2015-07-16 00:51:24help
centos2015-07-16 06:20:51help
cygwin2015-07-16 02:00:05help
debian2015-07-16 08:07:31help
debian-backports2015-07-16 08:50:04help
debian-cd2015-07-15 01:05:05
debian-security2015-07-16 08:30:55help
deepin2015-07-16 03:00:06help
dotdeb2015-07-16 01:52:20help
epel2015-07-16 07:18:55help
fedora2015-07-15 02:24:48help
freebsd2015-07-16 03:44:27help
gentoo2015-07-14 00:42:09help
gentoo-portage2015-07-16 04:04:06help
gentoo-portage-prefix2015-01-28 06:09:50
kali2015-06-26 03:50:35
kali-security2015-06-26 02:22:01
linux-kernel2015-07-16 04:06:53
macports2015-07-15 03:02:24
mariadb2015-07-15 15:32:35
mongodb2015-07-16 02:35:57
oldubuntu-releases2015-07-16 02:30:08
opensuse2015-07-15 13:29:03help
packman2015-06-03 02:26:11help
pypi2015-07-16 02:49:37help
raspbian2015-07-15 02:59:32help
rpmfusion2015-07-16 07:22:45
rubygems2015-07-15 03:08:28help
sabayonlinux2015-07-14 01:04:50
scientificlinux2015-07-15 12:20:55help
ubuntu2015-07-16 07:00:23help
ubuntu-releases2015-07-16 02:24:21
zabbix2015-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[/code] 

CentOS 6

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

CentOS 7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo[/code] 

3、之后运行yum makecache生成缓存

根据上述的描述操作即可快速完成yum源更换。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: