官方文档写的非常好

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. tls 双向认证 client端代码例子

    example: python import httplib import json import ssl import urllib2 import requests CA_FILE = " ...

  2. python简说(十二)time模块

    1.时间戳 print(int(time.time())) 2.取当前格式化好的时间 time.strftime('%Y-%m-%d %H:%M:%S') 3.时间戳转为格式化好的时间 time1 = ...

  3. python --- 07 补充( join 删除和添加 fromkeys ) 深浅拷贝

    一.基本数据类型补充 1.join() "*".join("马虎疼") # 马*虎*疼 把传递进去的参数进行迭代.  获取到的每个元素和前面的*进行拼接. 得到 ...

  4. C Primer Plus 创建友好的输入界面 笔记

    看代码 char inputFunCode; while(inputFunCode = getchar()){ '){ printf("you choose string conn\n&qu ...

  5. 【Spring Security】三、自定义数据库实现对用户信息和权限信息的管理

    一 自定义表结构 这里还是用的mysql数据库,所以pom.xml文件都不用修改.这里只要新建三张表即可,user表.role表.user_role表.其中user用户表,role角色表为保存用户权限 ...

  6. c# 之partial(分部代码和分部类)

    using System; namespace Partial { class Program { static void Main(string[] args) { A a = new A(); } ...

  7. C# 控制台运行 应用运行

    https://blog.csdn.net/Koala_Ivy/article/details/79577830 开发遇到的问题 记录一下 前段时间捣鼓dotnetty框架,服务端写了一个控制台程序来 ...

  8. (转载)winform图片标尺控件

    最近要做个winform的东西,要在里面集成一个类似Windows自带画图的标尺功能,还要能在图片上画矩形框.在网上找了好久也没找到写好的控件,无奈自己做了一个. 目前还有些bug,这里先做个分享.( ...

  9. Sublime Text 查找时排除指定的文件夹或文件

    Sublime Text 查找时排除指定的文件夹或文件 Ctrl + Shift + F这组快捷键可以调出 Sublime Text 的查找替换窗口,里边有一栏 Where,可以做一些高级设置:d:\ ...

  10. vscode已有64位版本。

    我的操作系统是win10 Family版本. vscode不知道什么鬼,只要开启没动任何操作,cpu就占到30%. 于是我打开任务管理器,选中vscode进程->转到详细信息->结束cpu ...