转自 https://blog.csdn.net/jameshadoop/article/details/54881295

centos7 修改yum源为阿里源,某下网络下速度比较快 首先是到yum源设置文件夹里

1.安装base reop源
cd /etc/yum.repos.d
1
接着备份旧的配置文件

sudo mv CentOS-Base.repo CentOS-Base.repo.bak
1
下载阿里源的文件

sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
1
2 安装epel repo源:
epel(RHEL 7)

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
1
epel(RHEL 6)

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
1
epel(RHEL 5)

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-5.repo
1
3.清理缓存
yum clean all
1
4.重新生成缓存
yum makecache

centos 7更换阿里源的更多相关文章

  1. ubuntu16.04LTS更换阿里源

    ubuntu16.04LTS更换阿里源 sudo gedit /etc/apt/sources.list 替换:    # deb cdrom:[Ubuntu 16.04 LTS _Xenial Xe ...

  2. Maven更换阿里源与仓库地址

    一.为什么要更换maven中的阿里源和仓库地址? 因为咱们下载安装的maven默认配置的源的服务器在国外,所以对于咱们来说,下载jar包的速度会很慢,所以咱们要把它替换为咱们国内的,可以换成好多,如华 ...

  3. ubuntu更换阿里源

    网上应该可以找到很多关于ubuntu源的设置方法,但是如果不搞清楚就随便设置的话,不仅不能起到应有的效果,还会由于一些问题导致apt不可用. 最正确的更换源的方法应该如系统提示的: ## a.) ad ...

  4. Centos 7 更换yum源

    Centos 7 更换源 yum clean all wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/ ...

  5. docker ubuntu容器更换阿里源(转)

    问题:使用docker 利用下载的ubuntu镜像启动容器时,使用的源下载更新软件的速度较慢. 解决这个问题的方法是跟新ubuntu容器的源 示例:以ubuntu为基础镜像 启动一个名称为 test0 ...

  6. 2.CentOS更换阿里源

    第一步:备份本地yum源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 第二步:下载阿里y ...

  7. CentOS 7 更换 阿里云/清华大学 yum 软件源

    阿里云参考:https://opsx.alibaba.com/mirror?lang=zh-CN 清华参考:https://mirrors.tuna.tsinghua.edu.cn/help/cent ...

  8. CentOS 7更换 安装源

    centos 安转源更换 一:切换到目录 cd /etc/yum.repos.d二: [备份] mv CentOS-Base.repo  CentOS-Base.repo.bak三 : [下载] wg ...

  9. yum更换阿里源

    备份mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 下载新的CentOS-Base.repo ...

随机推荐

  1. P3366 最小生成树【模板】 洛谷

    https://www.luogu.org/problem/show?pid=3366 题目描述 如题,给出一个无向图,求出最小生成树,如果该图不连通,则输出orz 输入输出格式 输入格式: 第一行包 ...

  2. 2016 ACM-ICPC CHINA-Final

    补题进度:10/12 地址:http://codeforces.com/gym/101194 A(签到) 略 B(数位DP) 题意: 定义一个01字符串为good串当且仅当将其奇数位或者偶数位单独拎出 ...

  3. MongoDB学习day09--Mongoose数据校验

    一.Mongoose检验参数 required : 表示这个数据必须传入max: 用于 Number 类型数据, 最大值 min: 用于 Number 类型数据, 最小值 enum:枚举类型, 要求数 ...

  4. 七天从零基础学习android(2)--第一个安卓程序

    在环境配置的那一部分,已经把基础的环境配置好了,接下来应该实现第一个安卓程序,就是著名的hello world 先在avd里面新建一个虚拟机,并且启动它 然后该虚拟机器能够在eclipse上正常识别 ...

  5. Spring的JDBC框架概述

    以下内容引用自http://wiki.jikexueyuan.com/project/spring/jdbc-framework.html: 在使用普通的JDBC操作数据库时,就会很麻烦的写很多不必要 ...

  6. Activity调用isDestroyed()方法报出,java.lang.NoSuchMethodError

    在測试App的过程中,Activity调用了isDestroyed()方法,报出了java.lang.NoSuchMethodError错误. 自己手机MI 2S,版本号4.1.1. 事实上原因就是i ...

  7. 再谈OpenCV

    虽然之前写过一篇关于OpenCV的介绍(http://blog.csdn.net/carson2005/article/details/5822149).但依旧有朋友对其不甚了解.所以,常常能碰到有人 ...

  8. /etc/profile与/etc/bashrc、交互式与非交互式、login与non-login shell的差别

    线上的memcached又挂了.仍然没有得到core文件. 排查原因,同事发现启动memcached的脚本存在可疑问题. 问题一:没有设置memcached工作文件夹,有可能core dump时没有工 ...

  9. C 编程中fseek、ftell的用法总结

    fseek 函数功能是将文件指针移动到指定的地方,因此可以通过fseek重置文件指针的位置.函数原型: int  fseek(FILE *stream, long offset,  int origi ...

  10. qemu -net tap配置上网

    1 该选项的用途 让qemu所在的宿主机器的tap网络接口和qemu的vlan n连接起来,从而进一步配置宿主机后,可以让qemu里面的操作系统可以通过vlan n里面的网卡上网. 2 真个系统的架构 ...