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

    五。完成

  • 相关阅读:
    拥塞避免
    计算机网络常考
    [CODEVS1014]装箱问题
    [CODEVS2055]集合划分
    [CODEVS3641]上帝选人
    [GRYZ2014]递增子序列最大和
    [GRYZ2014]最大连续子序列的和
    金矿模型看动归
    [CODEVS1220]数字三角形
    [CODEVS1294]全排列
  • 原文地址:https://www.cnblogs.com/GH-123/p/7965723.html
Copyright © 2011-2022 走看看