zoukankan      html  css  js  c++  java
  • 修改yum源

    一。进入yum源目录

    [root@VM_14_49_centos ~]# cd /etc/yum.repos.d/
    [root@VM_14_49_centos yum.repos.d]# ls
    CentOS-Base.repo  CentOS-Epel.repo
    [root@VM_14_49_centos yum.repos.d]# 

    二。备份yum源

    [root@VM_14_49_centos yum.repos.d]# mv CentOS-Base.repo ./CentOS-Base.repo.bak
    [root@VM_14_49_centos yum.repos.d]# ls
    CentOS-Base.repo.bak  CentOS-Epel.repo
    [root@VM_14_49_centos yum.repos.d]# 

    三。下载yum源(阿里云的)

    [root@VM_14_49_centos yum.repos.d]# wget http://mirrors.aliyun.com/repo/Centos-6.repo
    --2017-12-03 11:43:44--  http://mirrors.aliyun.com/repo/Centos-6.repo
    Resolving mirrors.aliyun.com... 183.60.159.232, 183.60.159.225, 183.60.159.226, ...
    Connecting to mirrors.aliyun.com|183.60.159.232|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2572 (2.5K) [application/octet-stream]
    Saving to: “Centos-6.repo”
    
    100%[===========================================================================================>] 2,572       --.-K/s   in 0s      
    
    2017-12-03 11:43:44 (382 MB/s) - “Centos-6.repo” saved [2572/2572]
    
    [root@VM_14_49_centos yum.repos.d]# ls
    Centos-6.repo  CentOS-Base.repo.bak  CentOS-Epel.repo
    [root@VM_14_49_centos yum.repos.d]# 

    四。修改yum源为阿里云的

    [root@VM_14_49_centos yum.repos.d]# mv Centos-6.repo ./CentOS-Base.repo
    [root@VM_14_49_centos yum.repos.d]# ls
    CentOS-Base.repo  CentOS-Base.repo.bak  CentOS-Epel.repo
    [root@VM_14_49_centos yum.repos.d]# yum makecache

    五。完成

  • 相关阅读:
    开发者论坛一周精粹(第九期)
    你刚吃的兰州牛肉面_背后就藏着大数据
    《C++覆辙录》——1.9:使用糟糕的语言
    老司机带你用MaxCompute和表格存储玩转车联网数据
    Gartner最新发布:2017年十大战略技术趋势
    js的事件的三个阶段,事件委托的原理
    Spring的AOP1
    了解SQL注入攻击
    了解XSS攻击
    了解Serialization
  • 原文地址:https://www.cnblogs.com/GH-123/p/7965723.html
Copyright © 2011-2022 走看看