官方文档写的非常好

14.5. Upgrading the System Off-line with ISO and Yum

  1. Create a target directory to mount your ISO image. This directory is not automatically created when mounting, so create it before proceeding to the next step, as root, type:
    mkdir mount_dir
    Replace mount_dir with a path to the mount directory. Typicaly, users create it as a subdirectory in the /media/ directory.
  2. Mount the Red Hat Enterprise Linux 5 installation ISO image to the previously created target directory. As root, type:
    mount -o loop iso_name mount_dir
    Replace iso_name with a path to your ISO image and mount_dir with a path to the target directory. Here, the -o loop option is required to mount the file as a block device.
  3. Check the numeric value found on the first line of the .discinfo file from the mount directory:
    head -n1 mount_dir/.discinfo
    The output of this command is an identification number of the ISO image, you need to know it to perform the following step.
  4. Create a new file in the /etc/yum.repos.d/ directory, named for instance new.repo, and add a content in the following form. Note that configuration files in this directory must have the .repo extension to function properly.
    [repository]
    mediaid=media_id
    name=repository_name
    baseurl=repository_url
    gpgkey=gpg_key
    enabled=1
    gpgcheck=1
    Replace media_id with the numeric value found in mount_dir/.discinfo. Set the repository name instead ofrepository_name, replace repository_url with a path to a repository directory in the mount point and gpg_key with a path to the GPG key.
    For example, the repository settings for Red Hat Enterprise Linux 5 Server ISO can look as follows:
    [rhel5-Server]
    mediaid=1354216429.587870
    name=RHEL5-Server
    baseurl=file:///media/rhel5/Server
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    enabled=1
    gpgcheck=1
  5. Update all yum repositories including /etc/yum.repos.d/new.repo created in previous steps. As root, type:
    yum update

RHEL 7

RHEL 5 , 用安装CD作为YUM的Repository的更多相关文章

  1. 通过yum升级CentOS/RHEL最小化安装

    1.如果你有安装CentOS / RHEL最小服务器安装,您可能有很多麻烦没有安装包 2.有一种方法来安装所有的包,需要一个基本的服务器,使用yum groupinstall命令 3.从最小的安装基本 ...

  2. 在Amazon AWS RHEL 7上安装 配置PPTP VPN

    0 前言 0.1 为什么需要VPN? 国内的VPN不是必须,但是国外的VPN是很有用的.连接到国外的VPN服务器之后就可以访问Google,Facebook, Youtube等网站,没有Google的 ...

  3. CentOS 7 / RHEL 7 上安装 LAMP + phpMyAdmin

    原文 CentOS 7 / RHEL 7 上安装 LAMP + phpMyAdmin 发表于 2014-11-02 作者 Haoxian Zeng 更新于 2014-12-12   之前根据在 Lin ...

  4. CentOS7安装配置Bacula yum方法

    参考: https://www.baidu.com/link?url=o2QIy2YZWjsJPAFJuYFhrH3nPvtyRkSe-o5Q_FqFZ5E1EMOsIOmGeKm0HAonwHOw8 ...

  5. RHEL 7.6 安装 Oracle 18c RAC

    RHEL 7.6 安装 Oracle 18c RAC 第一部分 安装规划 虚拟环境 VirtualBox 6.0 OS 版本 Red Hat Enterprise Linux Server relea ...

  6. RHEL 6.5 安装Docker

    一,配置远程yum源二,下载依赖包1.安装downloadonly插件使用yum下载rpm包2.下载docker需要的依赖包三,安装docker(离线节点)1. 依次执行docker的安装包2. 启动 ...

  7. centos7 安装zabbix3.0 安装zabbix4.0 yum安装zabbix 国内源安装zabbix 阿里云服务器安装zabbix

    首先,此篇文章是有原因的. 刚开始也和大家一样来学习安装zabbix 奈何网上的教程和现实出现不一样的情况 在安装zabbix过程中,因为zabbix下载源是在国外,下载途中会出现终止下载的情况 tr ...

  8. RHEL 6.3安装(超级详细图解教程)[转载]

        附:RHEL6.3下载地址 32位:http://rhel.ieesee.net/uingei/rhel-server-6.3-i386-dvd.iso 64位:http://rhel.iee ...

  9. Linux下安装mysql(yum和源码编译两种方式)

    这里介绍Linux下两种安装mysql的方式:yum安装和源码编译安装. 1. yum安装 (1)首先查看centos自带的mysql是否被安装: # yum list installed |grep ...

随机推荐

  1. ajax返回数据

    在使用远程js验证检测账户是否存在时,直在发请求后返回值无效,怎样把值返回回来呢重点注意两点 第一点:type不能省略,不能是异步,async: false 第二点:不能在直接请求成功后返回 var ...

  2. python之udp

    import socket s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM) s.bind(('127.0.0.1',8888)) while T ...

  3. Linux 字符设备驱动开发基础(二)—— 编写简单 PWM 设备驱动【转】

    本文转载自:https://blog.csdn.net/zqixiao_09/article/details/50858776 版权声明:本文为博主原创文章,未经博主允许不得转载.    https: ...

  4. POJ 2955 Brackets(区间DP)题解

    题意:问最多有几个括号匹配 思路:用dp[i][j]表示i到j最多匹配,若i和j构成匹配,那么dp[i][j] = dp[i + 1][j - 1] + 2,剩下情况dp[i][j] = max(dp ...

  5. 【做题】51NOD1518 稳定多米诺覆盖——容斥&dp

    题意:求有多少种方案,用多米诺骨牌覆盖一个\(n\times m\)的棋盘,满足任意一对相邻行和列都至少有一个骨牌横跨.对\(10^9+7\)取模. \(n,m \leq 16\) 首先,这个问题的约 ...

  6. 【做题】arc070_f-HonestOrUnkind——交互+巧妙思维

    做的第一道交互题-- 首先,有解的一个必要条件是\(a>b\).否则,即当\(a<=b\)时,可以有\(a\)个unkind的人假装自己就是那\(a\)个honest的人.(彼此之间都说是 ...

  7. 使用PlaceHolder,测试碰见的问题

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFa ...

  8. Kubenets 调试cronjob

    kubectl exec -ti dvm-dailyreport-debug-deployment-86c55496dc-2mzjz -n alpha /bin/bash # 进入namespace: ...

  9. CAS 单点登录 移动端获取TGT、ST 已经移动端登录页面不进行跳转的设置

    一.设置移动客户端验证ST通过后,页面不进行302重定向跳转 修改web.xml <!--**************************************************** ...

  10. ps/kill/pkill简单应用

    ps http://www.cnblogs.com/wangkangluo1/archive/2011/09/23/2185938.html 参数: 1)ps a 显示现行终端机下的所有程序,包括其他 ...