zoukankan      html  css  js  c++  java
  • Linux配置网络yum源,提高下载速度

    1、centos默认的网络源为官方源,官方源为国外的站点,下载与更新速度有点慢,这时将网络源设置为国内的就会比较完美了,国内的开源镜像站点主要有:阿里云、网易、清华大学。在这里我将以阿里云、网易的进行演示。先备份 CentOS-Base.repo,以后可随时恢复。下载新的CentOS-Base.repo 到 /etc/yum.repos.d/ 目录下。

    # 阿里的 ,根据自己的版本选择下载
    [root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
    [root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
    [root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
     
    # 网易的,根据自己的版本选择下载
    [root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo
    [root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
    [root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

    2、重新生成yum缓存,首先清除系统yum缓存,然后重新生成新的yum缓存

    [root@localhost ~]# yum clean all     
    [root@localhost ~]# yum makecache
  • 相关阅读:
    Vue学习笔记-2
    versionCompare 版本号比较工具
    Vue学习笔记-1
    工作机会
    PAT题目AC汇总(待补全)
    sqli-labs-master 第二关+第三关+第四关
    sqli-labs-master 盲注+第五关+第六关
    Java面向对象--equeal和==
    Java面向对象--object
    Java面向对象--成员变量的初始值
  • 原文地址:https://www.cnblogs.com/Neonuu/p/13578640.html
Copyright © 2011-2022 走看看