更换本地的yum源为阿里云提供的镜像

来源:互联网 发布:苹果手机2333软件 编辑:程序博客网 时间:2024/05/04 15:41

阿里云提供的yum镜像地址为:http://mirrors.aliyun.com/

MirrorLast updateHelpCPAN2016-03-31 15:49:25 CRAN2016-05-07 04:39:28 CTAN2016-05-07 04:11:50 apache2016-05-07 01:23:34 archlinux2016-05-07 16:56:19helpcentos2016-05-07 02:50:21helpceph2016-05-07 03:15:51helpcygwin2016-05-07 09:01:43helpdebian2016-05-07 16:06:24helpdebian-backports2016-05-07 16:50:04helpdebian-cd2016-05-04 01:05:05 debian-security2016-05-07 16:30:13helpdeepin2016-05-07 03:00:08helpdocker-engine2016-05-07 02:05:05helpdocker-toolbox2016-05-07 03:00:04helpdotdeb2016-05-07 00:05:36helpepel2016-05-07 14:26:46helpfedora2016-05-07 02:57:58helpfreebsd2016-05-06 23:29:36helpgentoo2016-05-07 00:43:20helpgentoo-portage2016-05-07 04:00:55helpgentoo-portage-prefix2015-01-28 06:09:50 kali2016-05-07 02:19:28 kali-security2015-06-26 02:22:01 linux-kernel2016-05-07 04:00:41 macports2016-05-06 03:03:19 mariadb2016-05-07 15:30:30 mongodb2016-05-07 02:36:46 oldubuntu-releases2016-05-07 02:30:07 opensuse2016-05-07 13:29:16helppackman2016-05-07 02:20:09helppypi2016-05-07 02:57:07helpraspbian2016-05-07 03:16:21helprpmfusion2016-05-07 04:01:39 rubygems2016-05-07 03:21:58helpsabayonlinux2016-05-07 01:30:07 scientificlinux2016-05-07 12:21:28helpubuntu2016-05-07 19:01:04helpubuntu-releases2016-05-07 02:24:30 zabbix2016-05-07 02:40:20

找到自己的使用系统,点击help,可以查看更换说明,以centos为例:http://mirrors.aliyun.com/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生成缓存


0 0
原创粉丝点击