yum源配置,亲测可用

最近在配置yum源发现了各种问题,网上回答太乱了,这里直接分享配置内容,拷贝内容进去即可。注意:针对centos7*版本。
具体步骤:
1、修改yum源文件(注意备份,既然不行也可不备份,麻烦)

cd /etc/yum.repos.d
#下载
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
#修改(把下面的内容帖进去即可)
vi CentOS-Base.repo

2、缓存更新

# 清缓存
yum clean all
# 重新缓存
yum makecache

注意:
*1、aliyuncs.com访问不了,直接注释即可
2、$releasever 没法适配上版本,直接全文替换成7

# 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-7 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/os/$basearch/
#        http://mirrors.aliyuncs.com/centos/7/os/$basearch/
#        http://mirrors.cloud.aliyuncs.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#released updates
[updates]
name=CentOS-7 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/updates/$basearch/
#        http://mirrors.aliyuncs.com/centos/7/updates/$basearch/
#        http://mirrors.cloud.aliyuncs.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that may be useful
[extras]
name=CentOS-7 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/extras/$basearch/
#        http://mirrors.aliyuncs.com/centos/7/extras/$basearch/
#        http://mirrors.cloud.aliyuncs.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/centosplus/$basearch/
#        http://mirrors.aliyuncs.com/centos/7/centosplus/$basearch/
#        http://mirrors.cloud.aliyuncs.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7#contrib - packages by Centos Users
[contrib]
name=CentOS-7 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/contrib/$basearch/
#        http://mirrors.aliyuncs.com/centos/7/contrib/$basearch/
#        http://mirrors.cloud.aliyuncs.com/centos/7/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

yum源配置,亲测可用相关推荐

  1. 2019.12QQ音乐播放接口最新配置(亲测可用)

    2019.12QQ音乐播放接口最新配置(亲测可用) config下的index.js 代理proxyTable配置: '/api': {target: 'https://c.y.qq.com', // ...

  2. PHP服务器在线测速系统源码+亲测可用

    正文: PHP服务器在线测速系统源码+亲测可用,已经可以近乎准确地测试本地到服务端的上下行速度和延迟波动轻量化程式. 下载方式: lanzou.com/ivMJb02uthla

  3. 最新图片在线加水印网页源码+亲测可用

    正文: 最新图片在线加水印网页源码+亲测可用,专门用于给图片加水印打码的工具,完全基于浏览器本地API,无任何网络请求. 程序: wwuwe.lanzouq.com/i1W4508nyhjc 图片:

  4. 2023最新Python国内镜像源,亲测可用

    1.镜像源 pip包管理工具可以下载第三方库到本地使用,第三方库的来源地址称之为镜像源,镜像源中存放了大量的开源库供我们下载使用.pip的默认镜像源地址在国外,下载很慢,本文收集了当前国内常用的镜像源 ...

  5. PostgreSQL 安装配置 (亲测可用)

    转自:http://blog.csdn.net/jesseyoung/article/details/41348835 受作者博客限制,请访问上面的链接 ---------- 下面是另一个转载 --- ...

  6. 红包封面发货平台卡密系统全新红包封面平台可搭建分站独立后台的源码-亲测可用

    红包封面发货平台 卡密系统 全新红包封面平台 可搭建分站 独立后台的源码下载 1.此款为红包封面发货平台源码 2.平台支持自定义分站 3.拥有独立后台,独立版权 4.兼容性强虚拟主机也可部署 5.20 ...

  7. 使用sqlldr导入.csv文件数据到oracle相关配置 亲测可用

    一.创建一个emp. ctl文件,内容具体配置如下 Load data CHARACTERSET ZHS16GBK  --编码 infile 'C:\Users\47641\Desktop\T_JCS ...

  8. Python pip切换为国内镜像源(亲测可用)

    http://pypi.douban.com/simple/ 豆瓣 http://mirrors.aliyun.com/pypi/simple/ 阿里 http://pypi.hustunique.c ...

  9. 云开发谁是卧底线下小游戏发牌助手微信小程序源码-亲测可用

    云开发谁是卧底线下小游戏源码,发牌助手微信小程序源码. "谁是卧底OL"是一个非常有趣,风靡全国的比拼语言表述能力.知识面与想象力的游戏. 谁是卧底OL是一款由开发商北游科技倾力打 ...

  10. 新版仿彩虹代刷网系统源码+亲测可用

    正文: ①将源码上传至虚拟机或者服务器并解压,访问域名/install/index.php安装. ②安装成功后登录后台,后台路径域名/admin,初始账号 admin,密码123456 ③:修改后台账 ...

最新文章

  1. python http接口_python处理http接口请求
  2. MIC4680-5.0YM-TR详细资料
  3. Android:AS与Unity3D之间打包的各种坑及解决方案
  4. python3.6.0安装教程-Python 3.6.0下载及安装教程
  5. Jenkins 最新版qq邮箱配置实例演示,5步设置保证邮件接收成功!
  6. python3.7怎么设置中文_解决 Bug · Python3.7.3官方文档 简体中文 · 看云
  7. JavaScript与JSP区别
  8. 代理服务器反向代理varnish配置文件解析
  9. .htaccess防盗链方法(文件、图片)
  10. 在controller类的每个方法执行前调用某个方法_springboot:异步调用@Async
  11. 响应式Web设计:HTML5和CSS3实战 笔记
  12. JDK源码——JDK8源码编译全流程(linux)
  13. 北航 软件学院课程 实用软件工具
  14. Spring核心JAR包
  15. gmx editconf命令
  16. petalinux(3)——创建APP
  17. MySQL基础篇3——DDL、DML、DCL使用篇
  18. 为什么千里马常有,而伯乐不常有
  19. Android进阶——Small源码分析之启动流程详解
  20. 虚拟化设备-Virtio介绍

热门文章

  1. msxml document class EOleSysError with message '没有注册类别' 错误的解决
  2. vim-工欲善其事必先利其器
  3. LaTeX 中插入中英双语目录
  4. rust中文补丁steam_steam腐蚀中文设置
  5. Linux版的杀毒软件——avast
  6. ajax写入json数据格式化,java ajax解析json数据格式化
  7. 个人简历中的自我评价
  8. 等保二级和等保三级有哪些区别
  9. 数值分析案例:Newton插值预测2019城市(Asian)温度、Crout求解城市等温性的因素系数
  10. 上海水务局智慧水务解决方案