• 由于Redhat版本的linux不能免费使用yum源安装依赖包,这导致不能愉快的安装Oracle的相关产品,本文就介绍一下如何在Redhat7上配置yum源
  • 首先查看一下Redhat7默认安装的yum,查询结果如下
[wen@localhost Desktop]$ rpm -qa | grep yum
  • 发现默认有安装yum,先将其卸载

[wen@localhost Desktop]$ su - root                         //切换到root用户 进行卸载
Password:
Last login: Sat Nov  2 19:50:09 CST 2019 on pts/0
[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps         //忽略依赖性 卸载
[root@localhost ~]# rpm -qa | grep yum             //再次查询是否还有yum相关的安装包,以确保卸载完全
  • 将准备好的yum安装包上传到虚拟主机,我是放在/home/yum目录下

  • 因为要替换,所以一定要是完整的一套,还有一个rhel-debuginfo.repo文件要配置。部分博客配置的不对,这个文件配置不对也是不行的,所以我是测试好的一套yum包给大家包括配置文件,需要的可以找我。执行: rpm -ivh *.rpm 一次性执行依赖包,因为包之间会相互依赖。
[root@localhost yum]# rpm -ivh *.rpm
  • 新建配置文件/etc/yum.repos.d/CentOS-Base.repo,加入以下内容即可,不要改动,不要以为你很厉害,真的!然后保存退出
[root@localhost yum]# 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-$7 - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7#released updates
[updates]
name=CentOS-$7 - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that may be useful
[extras]
name=CentOS-$7 - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$7&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$7 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7


然后执行yum clear all,就可以用yum来安装依赖包了

[root@node ~]# yum clear all

RedHat7使用yum源安装依赖包相关推荐

  1. Centos7使用yum源安装mysql5.7和redis

    Centos7使用yum源安装mysql5.7 Centos7使用yum源安装redis windows安装mysql5.7 RPM是什么: RPM 是 LINUX 下的一种软件的可执行程序,你只要安 ...

  2. linux CentOS7最小化安装环境静默安装Oracle11GR2数据库(安装依赖包_03)

    接上一篇:linux CentOS7最小化安装环境静默安装Oracle11GR2数据库(安装常用工具_02) 安装Oracle11GR2所需要的依赖包 有高手写成了这样: yum -y install ...

  3. centos 安装mysql客户端_linux下mysql的yum源安装/配置/卸载

    yum源安装 解决:赋予root权限 首先停止MySQL服务:service mysqld stop 加参数启动mysql:/usr/bin/mysqld_safe --skip-grant-tabl ...

  4. centos mysql安装_mysql yum源安装

    部署服务器环境的时候经常要安装mysql,以下是常见的安装方式 源码安装 rpm包安装 yum源安装 这篇主要介绍yum源安装. yum源下载 进入 https://dev.mysql.com/dow ...

  5. centos7 安装python3.7.1(亲测下面的安装依赖包)

    centos7自带python2,由于执行yum需要python2,所以即使安装了python3也不能删除python2 1.安装依赖包 yum -y groupinstall "Devel ...

  6. yarn安装依赖包报错 error An unexpected error occurred: “https://registry.npm.taobao.orgnpm/element-ui: get

    yarn安装依赖包报错,error An unexpected error occurred: "https://registry.npm.taobao.orgnpm/element-ui: ...

  7. php5 mysql 源_CentOS 7.4使用yum源安装MySQL5.7

    从CentOS 7.0发布以来,yum源中开始使用Mariadb来代替MySQL的安装.即使你输入的是yum install -y mysql , 显示的也是Mariadb的安装内容.使用源代码进行编 ...

  8. mysql repos_mysql yum源安装

    部署服务器环境的时候经常要安装mysql,以下是常见的安装方式 源码安装 rpm包安装 yum源安装 这篇主要介绍yum源安装. yum源下载 进入https://dev.mysql.com/down ...

  9. centos php rpm下载源,CentOS 6.2 使用第三方yum源安装更多rpm软件包 | 系统运维

    引言:CentOS自带的yum源中rpm包数量有限,很多时候找不到我们需的软件包,(例如:要安装网络连接查看软件iftop,默认设置下无法使用yum命令安装),下面教大家在CentOS 6.2中(以3 ...

最新文章

  1. NumPy Essentials 带注释源码 三、NumPy 数组使用
  2. 物联网常用模块_工业级SPI接口WiFi模块WG228助力工业物联网数据传输
  3. C++ 十大经典排序算法原理及模板之STL方法实现以及稳定性分析
  4. Oracle新建实例后,修改sys和system密码。
  5. cacti添加I/O监控
  6. php修改ini文件内容,php上传大文件需要修改的php.ini配置文件
  7. 2020年假期结束!支付宝发布国庆中秋黄金周报告:出行人次、购买力惊人!
  8. python里format有什么用_python format用法详解
  9. Python变量的作用范围
  10. MVC ---- 如何扩展方法
  11. 写给一些想创业的和在打工路上的人
  12. 安卓 4.3 no such colum
  13. 2019年复旦计算机专硕考研经验总结
  14. 高光谱图像异常探测导读
  15. MAVEN中filtering的作用是什么?
  16. 淘宝女装店铺如何提升转化?
  17. Beacon API的应用
  18. FPGA_Verilog学习之旅(3)---VGA贪吃蛇游戏
  19. ffmpeg 命令的使用
  20. 搜狗AI事业部张博:不只翻译机,半年内将推数款智能硬件产品

热门文章

  1. STM32F05 学习中............
  2. SpringBoot整合Spring Data Elasticsearch
  3. 麒麟系统ip连接数据库
  4. 这个春节,小灰收到一件不寻常的礼物
  5. 应用程序无法正常启动0xc000007b请点击确定关闭应用程序
  6. java记事本的撤回_对于记事本,怎样恢复刚刚撤销的?
  7. 华为手机如何设置主页面_华为手机怎么返回主界面
  8. 哪有什么高效安全运行,只不过是磁盘之间在负重前行 Linux RAID磁盘阵列
  9. Windows: 根据分组的本地TCP/IP打印机的安装(1)
  10. 【解纠缠表示:图像增强】