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
  • 相关阅读:
    redis学习
    win2008下c#调用directshow问题
    vs2005升级到vs2010相关问题
    spark-shell 启动失败,显示端口问题
    监控spark-sql 等脚本
    spark 相关配置 shuffle 相关配置选项
    spark on Yarn 语句
    使用hive thriftserver 连接spark sql
    HBase 报错系列之region is not online
    HBase 表迁移中对丢失的表检查使用的语句
  • 原文地址:https://www.cnblogs.com/Neonuu/p/13578640.html
Copyright © 2011-2022 走看看