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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了把系统默认的yum源改为阿里云(从阿里云里下载软件)相关的知识,希望对你有一定的参考价值。

Yum 源

Yum repolist

技术分享图片
[[email protected] ~]# 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
[[email protected] 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源改为阿里云(从阿里云里下载软件)的主要内容,如果未能解决你的问题,请参考以下文章

Linux(CentOS7.1)修改默认yum源为国内的阿里云yum源

Linux(CentOS6.5)修改默认yum源为国内的阿里云网易yum源

Deepin 更改为 阿里云源

阿里云配置详解

更改yum网易 阿里云的yum源。

阿里云centos6.6怎么更新yum软件源升级php7