zoukankan      html  css  js  c++  java
  • centos6换阿里源/华为源

    1.备份原来的源文件

    mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
    2.换源

    阿里源:

    [root@linux ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
    --2019-07-10 01:22:45--  http://mirrors.aliyun.com/repo/Centos-6.repo
    正在解析主机 mirrors.aliyun.com... 115.223.14.213, 122.225.67.224, 115.223.14.214, ...
    正在连接 mirrors.aliyun.com|115.223.14.213|:80... 已连接。
    已发出 HTTP 请求,正在等待回应... 200 OK
    长度:2523 (2.5K) [application/octet-stream]
    正在保存至: “/etc/yum.repos.d/CentOS-Base.repo”
    
    100%[=============================================================>] 2,523       --.-K/s   in 0s      
    
    2019-07-10 01:22:50 (312 MB/s) - 已保存 “/etc/yum.repos.d/CentOS-Base.repo” [2523/2523]

    华为源:

    wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.huaweicloud.com/repository/conf/CentOS-6-anon.repo

    详见华为云官网说明:https://mirrors.huaweicloud.com

    3.清理

    [root@linux ~]# yum clean all
    已加载插件:fastestmirror, refresh-packagekit, security
    Cleaning repos: base extras updates
    清理一切
    Cleaning up list of fastest mirrors

    4.生成缓存

    [root@linux ~]# yum makecache
    已加载插件:fastestmirror, refresh-packagekit, security
    Determining fastest mirrors
     * base: mirrors.aliyun.com
     * extras: mirrors.aliyun.com
     * updates: mirrors.aliyun.com
    base                                                                            | 3.7 kB     00:00     
    base/group_gz                                                                   | 242 kB     00:00     
    base/filelists_db                                                               | 6.4 MB     00:00     
    base/primary_db                                                                 | 4.7 MB     00:00     
    base/other_db                                                                   | 2.8 MB     00:00     
    extras                                                                          | 3.4 kB     00:00     
    extras/filelists_db                                                             |  24 kB     00:00     
    extras/prestodelta                                                              | 2.2 kB     00:00     
    extras/primary_db                                                               |  29 kB     00:00     
    extras/other_db                                                                 |  14 kB     00:00     
    updates                                                                         | 3.4 kB     00:00     
    updates/filelists_db                                                            | 3.6 MB     00:00     
    updates/prestodelta                                                             | 175 kB     00:00     
    updates/primary_db                                                              | 5.1 MB     00:00     
    updates/other_db                                                                | 249 kB     00:00     
    元数据缓存已建立
  • 相关阅读:
    vue中使用v-bind="$attrs"和v-on="$listeners"进行多层组件监听
    钉钉小程序开发遇到的坑
    promise、async、await、settimeout异步原理与执行顺序
    js获取url参数值的几种方式
    ES6解构赋值
    2019年前端面试题
    浏览器兼容问题踩坑收集
    react+antd分页 实现分页及页面刷新时回到刷新前的page
    无侵入埋点
    CSS学习笔记(三)空白符和换行
  • 原文地址:https://www.cnblogs.com/auguse/p/13625441.html
Copyright © 2011-2022 走看看