阿里云参考:https://opsx.alibaba.com/mirror?lang=zh-CN

清华参考:https://mirrors.tuna.tsinghua.edu.cn/help/centos/

阿里云:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

清华:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
vi /etc/yum.repos.d/CentOS-Base.repo # CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
# [base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

更新软件包缓存

yum makecache

CentOS 7 更换 阿里云/清华大学 yum 软件源的更多相关文章

  1. CentOS 7 配置阿里云本地yum源

    删除原有的yum源: rm -f /etc/yum.repos.d/* 重新下载阿里云的yum源: wget -O /etc/yum.repos.d/CentOS-Base.repo http://m ...

  2. 教你优化yum源。配置阿里云的yum镜像源(base和epel)

    一.Centos7的base源配置阿里云的yum源: 1.备份旧的yum源目录下的所有文件 [root@ELK-chaofeng07 yum.repos.d]# mkdir ../yum.repos. ...

  3. 为 Virtual Box 中的 CentOS 6.6 配置本地DVD光盘做yum软件源

    因为virtual box 中的centos配置host-only共享win7上网,配置失败,所以只能使用Centos的 DVD 光盘来配置yum软件源.不然就没得完了. 1. 首先要在virtual ...

  4. CentOS 7 使用 Yum 软件源安装谷歌 Chrome 浏览器

    Google Chrome是一款由 Google 公司开发的网页浏览器,新版的 Chrome 浏览器使用的是 Blink 内核,具有运行速度快,稳定的特性.Chrome 能够运行在 Windows,L ...

  5. centos配置ADSL拨号 配置阿里云的yum源

    如果系统yum源有问题可以更改yum源配置阿里云的yum源1)下载repo文件 wget http://mirrors.aliyun.com/repo/Centos-7.repo(没有 wget命令可 ...

  6. Centos 7 配置阿里云 yum 源

    Centos 7 配置阿里云 yum 源 一. 禁用 yum 插件 fastestmirror 修改插件的配置文件 cp /etc/yum/pluginconf.d/fastestmirror.con ...

  7. 阿里云Linux安装软件镜像源

    阿里云Linux安装软件镜像源 阿里云是最近新出的一个镜像源.得益与阿里云的高速发展,这么大的需求,肯定会推出自己的镜像源.阿里云Linux安装镜像源地址:http://mirrors.aliyun. ...

  8. CentOS7使用阿里云的yum源

    替换成阿里云的yum源速度更快一些,替换很简单,简单记录一下步骤 1.备份原来的yum源 sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repo ...

  9. 更改yum网易 阿里云的yum源。

    一,鉴于用国外的Yum源,速度比较慢,所以想到将国外的yum源,改为国内的Yum源,著名的有网易 阿里云源.如何更改呢? 二,更改yum源为网易的. 首先备份/etc/yum.repos.d/Cent ...

随机推荐

  1. 数据库表数据传输到Oracle方案

    方案步骤为:数据导出到文件(增量或全量),通知接口文件就绪(上传到ftp或提供下载url),接收方下载文件,解析文件并入库.Oracle需要建立对应的临时表和正式表,入库步骤为:清空临时表,批量插入数 ...

  2. Netty--TCP粘包和拆包

    TCP协议以流的方式进行数据传输,它无法理解其上层协议的数据意义,而是根据TCP缓冲区的大小对数据进行拆分或组装,即上层一个完整的包可能被拆为几个TCP包来发送,或上层几个包会被组合为一个TCP包发送 ...

  3. java代码-------继承的方法----重写还是重载

    总结:是自己不听讲吧,不懂啊 感觉父类的方法,子类可以重载,只要参数个数不同,重载与返回值没有关系 重写绝对是可以的.但答案是只能重写啊 package com.s.x; public class T ...

  4. java代码---I/O文件内容复制

    总结:主要是弄清输入流,输出流 输入流和输出流都是针对程序而言,把文件内容读取到程序是输入流 从程序把内容写入文件是输出流 package com.a.b; import java.io.*; imp ...

  5. centos7系统安装python3,pip3,django

    首先去python官网下载python3的源码包,网址:https://www.python.org/ 或者直接wget下载 wget https://www.python.org/ftp/pytho ...

  6. linux-强制断开远程tcp连接

    最近在做日常维护,搭建了socks代理,但是socks代理服务已经关闭了,由于其他机器还在和我的服务器保持tcp长连接 e.g. tcp ESTAB Google了一下,没找到特别好的办法,例如ipt ...

  7. 用户从手机的浏览器访问www.baidu.com,看到的可能跟桌面PC电脑,是不太一样的网页效果,会更适合移动设备使用。请简要分析一下,实现这种网页区分显示的原因及技术原理。

    手机的网速问题.屏幕大小.内存.CPU等.通过不同设备的特征,实现不同的网页展现或输出效果.根据useragent.屏幕大小信息.IP.网速.css media Query等原理,实现前端或后端的特征 ...

  8. 关于@Autowired使用注意点

    @Autowired是按类型进行装配的,那么我一个接口UserInterface,有多个实现类AImpl(@service(name="userInterface1")),BImp ...

  9. PHP RSA加密解密

    1.生成密钥和公钥 开始前需要准备openssl环境 linux 需要安装openssl工具包,传送门http://www.openssl.org/source/ window 下需要安装openss ...

  10. 超越Google,腾讯推出自研图片编码格式TPG

    近日,记者从国家知识产权局了解到,腾讯公司正式向国家知识产权局提交了一份关于图片编码技术的专利申请.此项专利被命名为TPG(Tiny Portable Graphics),在数据上TPG图片格式产生的 ...