这里需要有网。因为我们需要下载会用到wget

[root@localhost ~]# iptables -F
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld
[root@localhost ~]# setenforce 0
[root@localhost ~]#
[root@localhost ~]# rpm -q wget     yum -y install wget
wget-1.14-15.el7_4.1.x86_64
[root@localhost ~]# cd /etc/yum.repos.d
[root@localhost yum.repos.d]# ls
backup  bak  centos.repo
[root@localhost yum.repos.d]# mv centos.repo bak
[root@localhost yum.repos.d]# ls
backup  bak
[root@localhost yum.repos.d]# cd

互联网yum源

http://mirrors.aliyun.com/repo/CentOS-7.repo

[root@bogon ~]# wget -O /etc/yum.repos.d/aliyun.repo https://mirrors.aliyun.com/repo/Centos-7.repo
--2019-02-18 17:14:15--  https://mirrors.aliyun.com/repo/Centos-7.repo
正在解析主机 mirrors.aliyun.com (mirrors.aliyun.com)... 103.15.99.92, 103.15.99.94, 103.15.99.90, ...
正在连接 mirrors.aliyun.com (mirrors.aliyun.com)|103.15.99.92|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:2523 (2.5K) [application/octet-stream]
正在保存至: “/etc/yum.repos.d/aliyun.repo”

100%[================================================================>] 2,523       --.-K/s 用时 0s

2019-02-18 17:14:15 (8.95 MB/s) - 已保存 “/etc/yum.repos.d/aliyun.repo” [2523/2523])
yum -y  clean all
yum makecache
这样重新把数据建立,就直接可以用阿里的yum源了

如何使用阿里云的yum源的更多相关文章

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

    一,鉴于用国外的Yum源,速度比较慢,所以想到将国外的yum源,改为国内的Yum源,著名的有网易 阿里云源.如何更改呢? 二,更改yum源为网易的. 首先备份/etc/yum.repos.d/Cent ...

  2. CemtOS7更改yum网易 阿里云的yum源。

    一,鉴于用国外的Yum源,速度比较慢,所以想到将国外的yum源,改为国内的Yum源,著名的有网易 阿里云源.如何更改呢? 二,更改yum源为网易的. 首先备份/etc/yum.repos.d/Cent ...

  3. CentOS7用阿里云Docker Yum源在线安装Docker 17.03.2

        参考文档 安装步骤 删除已安装的Docker 配置阿里云Docker Yum源 安装指定版本 启动Docker服务 参考文档 官方Docker安装文档:https://docs.docker. ...

  4. CentOS7用阿里云Docker Yum源在线安装Docker

    一.参考文档 官方Docker安装文档:https://docs.docker.com/install/linux/docker-ce/centos 阿里云Docker安装文档:https://yq. ...

  5. CentOS 7 配置阿里云本地yum源

    删除原有的yum源: rm -f /etc/yum.repos.d/* 重新下载阿里云的yum源: wget -O /etc/yum.repos.d/CentOS-Base.repo http://m ...

  6. 更改yum网易、阿里云的yum源

    更改yum源为网易的. 首先备份/etc/yum.repos.d/CentOS-Base.repomv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos ...

  7. 如何在 Centos7 中使用阿里云的yum源

    如何在 Centos7 中使用阿里云的yum源 1. 备份原来的yum源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Ba ...

  8. centos配置ADSL拨号 配置阿里云的yum源

    如果系统yum源有问题可以更改yum源配置阿里云的yum源1)下载repo文件 wget http://mirrors.aliyun.com/repo/Centos-7.repo(没有 wget命令可 ...

  9. CentOS7使用阿里云的yum源

    替换成阿里云的yum源速度更快一些,替换很简单,简单记录一下步骤 1.备份原来的yum源 sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repo ...

  10. 将Centos 的默认yum源改为阿里云的yum源后出现的问题

    阿里各版本yum源如下: Centos5:http://mirrors.aliyun.com/repo/Centos-5.repo Centos6:http://mirrors.aliyun.com/ ...

随机推荐

  1. css3媒介查询使用规则小结

    响应式布局可以为不同终端的用户提供更加舒适的界面和更好的用户体验,而且随着目前大屏幕移动设备的普及,用大势所趋来形容也不为过. 用一句话来说:使用同一套Html代码来适配不同设备和满足不同场景不同用户 ...

  2. jquery为元素绑定事件

    语法 $(selector).live(event,data,function) 参数event 必需,规定附加到元素的一个或多个事件.由空格分隔多个事件,必须是有效的事件.data 可选,规定传递到 ...

  3. spring注解@Autowired和@Resource比较

    用途:都是做bean的注入时使用 历史:@Autowired        属于Spring的注解    org.springframework.beans.factory.annotation.Au ...

  4. Linux的mysql搭建

    1.centos7默认安装mariadb数据库 #yum  remove mariadb* 2.wget mysql数据库地址  如果是普通用户,请提权  sudo提权 3.yum local ins ...

  5. NGUI报错处理

     Unity5.4.1与NGUI出现的问题Ignoring menu item NGUI because it is in no submenu!   Ignoring menu item NGUI ...

  6. Netty、NIO、多线程

    一:Netty.NIO.多线程? 时隔很久终于又更新了!之前一直迟迟未动也是因为积累不够,后面比较难下手.过年期间@李林锋hw发布了一个Netty5.0架构剖析和源码解读,看完也是收获不少.前面的文章 ...

  7. bilibili用户信息查询

    bilibili用户信息查询 http://space.bilibili.com/ajax/member/GetInfo?mid= 后缀为用户mid号 # -*- coding:utf-8 -*- # ...

  8. 2015 Multi-University Training Contest 9 hdu 5396 Expression

    Expression Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total ...

  9. java基础——transient

    今天在看struts1源代码的时候,发如今ActionForm中首先声明了两个transient类型的protected变量. 之前没有接触过该transient类型,所以就查了查. transien ...

  10. 英语发音规则---X字母

    英语发音规则---X字母 一.总结 一句话总结: 1.x位于词尾或音节尾部,读/ks/? box /bɒks/ n.盒; 箱状物 fix /fɪks/ vt.固定 fox /fɒks/ n.狐; 狐狸 ...