有的网络环境限制了访问所有外国IP,连yum都成了问题,只能改成国内源使用,特此记录一下清华大学源,以便日后需要

cd /etc/yum.repos.d/

mv CentOS-Base.repo CentOS-Base.repo.bak

mv epel.repo epel.repo.bak(没有可忽略)

vim 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=http://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates

[updates]

name=CentOS-$releasever - Updates

baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/

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=http://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/

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=http://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

vim epel.repo[epel]

name=Extra Packages for Enterprise Linux 7 - $basearch

baseurl=http://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch

#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch

failovermethod=priority

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]

name=Extra Packages for Enterprise Linux 7 - $basearch - Debug

baseurl=http://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch/debug

#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch

failovermethod=priority

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

gpgcheck=1

[epel-source]

name=Extra Packages for Enterprise Linux 7 - $basearch - Source

baseurl=http://mirrors.tuna.tsinghua.edu.cn/epel/7/SRPMS

#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch

failovermethod=priority

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

gpgcheck=1

添加RPM-GPG-KEY-EPEL-7curl https://mirrors.tuna.tsinghua.edu.cn/epel/RPM-GPG-KEY-EPEL-7 > /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

运行以下命令生成缓存

yum clean all

yum makecache

linux镜像清华源,清华大学TUNA镜像源 - CentOS 7相关推荐

  1. pip清华源(清华大学国内镜像)安装地址

    python环境在安装源文件时使用默认安装很慢,使用国内清华源速度比较快,地址如下: https://pypi.tuna.tsinghua.edu.cn/simple 临时使用 可以在使用pip的时候 ...

  2. OpenWrt软件源清华大学镜像

    大天朝的网络大家 也是知道的,在OpenWrt下用opkg安装软件包真的是要命.不过没关系,我们可以用镜像服务器来安装软件包. OpenWrt在官网提供了 几个镜像服务器,清华大学的镜像也赫然在列,鼓 ...

  3. Google源码国内镜像源

    清华大学 TUNA 镜像源 https://mirrors.tuna.tsinghua.edu.cn/help/AOSP/ 中科大镜像源 https://lug.ustc.edu.cn/wiki/mi ...

  4. 来自清华大学开源镜像站LinuxToy的公开信~

    来自清华大学开源镜像站的公开信 首先对大家说一声对不起,作为 LT 编辑的我已经很久没为 LT 做贡献,这次却利用"职务之便"在 LinuxToy 发布这封公开信.但事关镜像站生死 ...

  5. Linux换源,换第三方源,安装输入法

    一,Kali Linux换源 1,leafpad /etc/apt/sources.list 2,在打开的文件中输入下面的源,保存退出 #kali官方源 deb http://http.kali.or ...

  6. android 清华镜像,清华镜像网站下载android源码并编译

    8种机械键盘轴体对比 本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选? 下载android源码方法: 我的系统是ubuntu 18.04,主要参考了blog通过清华大学镜像下载Android源 ...

  7. Linux ISO镜像源,yum源,docker镜像源,docker加速器,maven仓库整理

    linux镜像源 centos https://wiki.centos.org/Download http://mirrors.sohu.com/ http://mirrors.163.com/ ht ...

  8. pip清华源(国内常用镜像源)安装地址

    国内常用镜像源 清华大学 :https://pypi.tuna.tsinghua.edu.cn/simple/ 阿里云:http://mirrors.aliyun.com/pypi/simple/ 中 ...

  9. Windows 10 Conda 更换清华大学的镜像源

    Windows 10__Conda 更换清华大学的镜像源 问题描述 参考相关博客,在Windows 10系统下配置Conda镜像源,执行conda update conda时报错: Collectin ...

最新文章

  1. 晴天计算机按键,电脑怎样才能在按键的时候,按下去按键没反应,手台起来才有呢?...
  2. 20 道 Spring Boot 面试题
  3. C++继承的基本语法
  4. SQL案例_0_员工表数据集
  5. ODPS主备集群双向数据复制导致主备中心网络打爆问题
  6. CF374 Maxim and Array
  7. MySQL笔记汇总---狂神说
  8. 496. 下一个更大元素 I/503. 下一个更大元素 II/739. 每日温度
  9. 修改服务器资产信息,CMDB服务器管理系统【s5day90】:创建资产更新服务器硬盘信息...
  10. Neutron中Linux Bridge与Open vSwitch优劣势对比
  11. 比特率,比特,字节的计算
  12. mybatis之 trim prefix=( suffix=)
  13. AI Arena:Paradigm领投的NFT AI竞技场
  14. python自动点击按钮_python实现按钮自动点击
  15. 实现搜索框(含历史搜索记录)
  16. 程序员月入好几万?10年老程序员告诉你真实的情况!!
  17. mysql 授权root帐号可以远程访问,导入sql文件,登录mysql用root帐号,设置密码
  18. WXS:微信小程序版JavaScript
  19. 视频伪原创工具 苹果手机视频md5值修改
  20. GTX 770 (GK 104)

热门文章

  1. onShareAppMessage 使用uniapp小程序分享好友,朋友圈功能
  2. esp-idf4.4 esp32s3 usb_cdc和u盘使用
  3. 【云栖大会】马云:真正的冲击来源于对未来的无知无畏
  4. 原生 js 实现类 3d 地图大屏展示自动高亮轮播、显示悬浮提示 tootip 的方案:svg + popper.js 定位引擎
  5. GPP(Group Policy Preferences)策略组首选项漏洞
  6. Itext处理阿拉伯文本时,对html样式dir=‘rtl‘不生效的2种解决方案
  7. 暑期实践Vue7.17
  8. Postgresql ERROR: database is not accepting commands to avoid wraparound data loss in database
  9. 我的第二个Asp.Net 项目,B2C购物网站
  10. Teigha4.0 Dwg数据与shp数据转换代码