1.进入源文件

[root@localhost ~]#cd /etc/yum.repos.d/  #进入源文件
[root@localhost yum.repos.d]# ls
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo    CentOS-Vault.repo
CentOS-CR.repo    CentOS-fasttrack.repo  CentOS-Sources.repo
[root@localhost yum.repos.d]# mkdir repo_bak   #创建文件夹
[root@localhost yum.repos.d]# mv *.repo repo_bak/  #当前repo源移动到新建文件里
[root@localhost yum.repos.d]# ls  #查看
repo_bak
[root@localhost yum.repos.d]#

2.下载阿里yum

[root@localhost yum.repos.d]# yum install wget #下载wget
[root@localhost yum.repos.d]# wget http://mirrors.aliyun.com/repo/Centos-7.repo
[root@localhost yum.repos.d]# yum clean all  #清空缓存
Loaded plugins: fastestmirror
Cleaning repos: base extras updates
Cleaning up list of fastest mirrors
[root@localhost yum.repos.d]# yum makecache #生成
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Determining fastest mirrors

3.安装epel源

[root@localhost yum.repos.d]#  yum install -y epel-release #安装epel
[root@localhost yum.repos.d]# wget -O /etc/yum.repos.d/epel-7.repo http://mirrors.aliyun.com/repo/epel-7.repo #安装阿里云开源epel源
[root@localhost yum.repos.d]# yum clean  all #清空
[root@localhost yum.repos.d]# yum makecache  #生成

4.验证

[root@localhost yum.repos.d]# yum repolist all
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository epel is listed more than once in the configuration
Repository epel-debuginfo is listed more than once in the configuration
Repository epel-source is listed more than once in the configuration
Loading mirror speeds from cached hostfile
repo id                             repo name                                                               status
base/7/x86_64                       CentOS-7 - Base - 163.com                                               enabled: 10,072
centosplus/7/x86_64                 CentOS-7 - Plus - 163.com                                               disabled
contrib/7/x86_64                    CentOS-7 - Contrib - mirrors.aliyun.com                                 disabled
epel/x86_64                         Extra Packages for Enterprise Linux 7 - x86_64                          enabled: 13,595
epel-debuginfo/x86_64               Extra Packages for Enterprise Linux 7 - x86_64 - Debug                  disabled
epel-source                         Extra Packages for Enterprise Linux 7 - x86_64 - Source                 disabled
epel-testing/x86_64                 Extra Packages for Enterprise Linux 7 - Testing - x86_64                disabled
epel-testing-debuginfo/x86_64       Extra Packages for Enterprise Linux 7 - Testing - x86_64 - Debug        disabled
epel-testing-source/x86_64          Extra Packages for Enterprise Linux 7 - Testing - x86_64 - Source 

5.完结-----持续更新

下载yum源和epel源相关推荐

  1. CentOS7配置阿里云yum源和EPEL源

    CentOS7配置阿里云yum源和EPEL源 1.备份 [root@bogon ~]# cd /etc/yum.repos.d/ [root@bogon yum.repos.d]# mkdir rep ...

  2. CentOS 7更换阿里或者163 yum源和epel源

    #备份默认的yum源 #下载国内的yum源 –163源 –阿里源 #清理缓存文件 //可以不用执行 #生成新源的元文件 //可以不用执行 #安装epel源 #查看yum源和epel源 #备份默认的yu ...

  3. centos7 配置国内yum源和epel源

    组合脚本: yum install -y wget cd /etc/yum.repos.d/ mkdir repo_bak mv *.repo repo_bak/ wget http://mirror ...

  4. 配置阿里云 yum 源和 EPEL 源

    阿里云YUM源 1.备份 mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 2.下载新的Cen ...

  5. 配置阿里yum源和epel源

    配置阿里的yum源 备份 cd /etc/yum.repos.d/ mkdir bak mv * ./bak/ 下载阿里yum源 wget -O /etc/yum.repos.d/CentOS-Bas ...

  6. Centos 安装阿里云yum源和EPEL源

    一.首先安装wget,备份原来的centos官方yum源 yum install wget -y cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos ...

  7. CentOS8的yum源和EPEL源都设置为阿里云镜像的正确做法

    转载 https://blog.csdn.net/u012915636/article/details/105992649

  8. 内网自建yum源和apt源(含各信创系统)

    现在Linux下面软件基本是通过yum/apt等从软件仓库在线安装,大的Linux发行版都有自己的软件仓库.如CentOS/RedHat使用yum方式仓库,ubuntu使用apt方式仓库. 很多政企单 ...

  9. 内网服务器自建 yum、epel 源仓库

    内网服务器自建 yum 源在前面文章中已更新, 快捷通道:https://blog.csdn.net/weixin_45512662/article/details/105348960?spm=100 ...

最新文章

  1. python中列表和集合_15个例子掌握Python列表,集合和元组
  2. 【Asp.Net】得到http请求中的参数语句
  3. 智能车百度赛道培训第二弹-算法篇
  4. Linux常用命令简述--wc
  5. troubleshoot之:使用JFR分析性能问题
  6. dotNET Core 3.X 使用 Autofac 来增强依赖注入
  7. Taro+react开发(57) 图片引入
  8. java引用传递_理解Java中的引用传递和值传递
  9. ajax 自动提示信息,自动提示使用AJAX
  10. 首次c#蓝牙开发踩坑记录
  11. python迭代计算pi_python使用三角迭代计算圆周率PI的方法
  12. flask_restplus和swagger
  13. 14.msql_python
  14. hypermesh 错误 2005
  15. 液晶拼接处理器_你想了解的LCE拼接屏幕都在这里
  16. 入侵服务器修改数据教程,入侵服务器 修改数据库
  17. [JZOJ6080]【GDOI2019模拟2019.3.23】IOer【生成函数】【数学】
  18. 山东理工大学ACM平台题答案关于C语言 1177 C语言实验——时间间隔
  19. domian shift
  20. “图形驱动程序无法找到兼容的图形硬件”的处理方式

热门文章

  1. html5云朵效果,纯CSS3打造逼真的多层云彩动画特效
  2. Postgres个人学习笔记
  3. 武汉理工大学C语言 作业练习
  4. 常用postgresql命令
  5. centos7连接不上网络,保姆级演示,亲测,亲测
  6. 快速将纸质文件变为电子稿件
  7. wget 命令 指定文件夹_Wget 命令详解
  8. ant man 什么意思_外贸尾货,在外贸邮件里出现爱的ant是什么意思?
  9. 如何成为视觉传达的大神——格式塔原理
  10. SQL语言---数据更新