码迷,mamicode.com
首页 > 其他好文 > 详细

把系统默认的yum源改为阿里云(从阿里云里下载软件)

时间:2018-08-16 21:34:51      阅读:313      评论:0      收藏:0      [点我收藏+]

标签:查看   extras   speed   tps   linu   ofo   技术分享   ack   png   

Yum 源

Yum repolist

技术分享图片
[root@oldboyedu50 ~]# yum repolist 查看当前的yun源
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
base: mirrors.aliyun.comm
updates: mirrors.ali
extras: mirrors.aliyun.co
yun.com
epel | 3.2 kB 00:00
epel/primary | 3.2 MB 00:09
epel 12518/12518
repo id repo name status
base CentOS-6 - Base - mirrors.aliyun.com 6,713
epel Extra Packages for Enterprise Linux 6 - x8664 12,518
extras CentOS-6 - Extras - mirrors.aliyun.com 31
updates CentOS-6 - Updates - mirrors.aliyun.com 45
repolist: 19,307 软件包数量

2.1 把系统默认的yum源 改为阿里云(从阿里云里下载软件)
https://opsx.alibaba.com 网址

备份:mv /etc/yum.repos.d/CentOS-Base.repo系统 /etc/yum.repos.d/CentOS-Base.repo.backup
2.2 配置CentOS6yum源 :wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
/etc/yum.repos.d/CentOS-Base.repo系统默认yun的配置文件base extras updates

diff CentOS-Base.repo CentOS-Base.repo.backup
vimdiff CentOS-Base.repo CentOS-Base.repo.backup (vimdiff为了两个对比)

2.3 配置epel:
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
[root@oldboyedu50 yum.repos.d]# yum repolist
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
base: mirrors.aliyun.com
extras: mirrors.aliyun.com
updates: mirrors.aliyun.com
epel | 3.2 kB 00:00
repo id repo name status
base CentOS-6 - Base - mirrors.aliyun.com 6,713
epel Extra Packages for Enterprise Linux 12,518
extras CentOS-6 - Extras - mirrors.aliyun.c 31
updates CentOS-6 - Updates - mirrors.aliyun. 45
repolist: 19,307增加后的

2.4 清华:centos点击问号
https://mirrors.tuna.tsinghua.edu.cn/help/centos/
yum clean all #清空yum缓存

把系统默认的yum源改为阿里云(从阿里云里下载软件)

标签:查看   extras   speed   tps   linu   ofo   技术分享   ack   png   

原文地址:http://blog.51cto.com/13860358/2160919

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!