Step # 1: Mount an ISO file

Type the following command (replace iso file name with the actual iso file):

# yum install createrepo

# mkdir -p /mnt/iso/{1,2,3}

# mount -o loop /path/to/centos1.iso /mnt/iso/1

Step # 2: Create a repository

Use createrepo to generate the necessary XML metadata. Type the following commands:

# cd /mnt/iso

# createrepo .

Clean repo, enter:

# yum clean all

Step # 3: Create config file

You need to create a repo config file in /etc/yum.repos.d/ directory.

# vi /etc/yum.repos.d/iso.repo

Append following text:

[My ISO Repository]

baseurl=file:///mnt/iso

enabled=1

gpgcheck=1

gpgkey=file:///mnt/iso/1/RPM-GPG-KEY-redhat-releaseSave and close the changes.

Now use yum command to install packages from ISO images:

# yum install package-name

Howto Setup yum repositories to update or install package from ISO CDROM Image的更多相关文章

  1. HOWTO: Setup XCode 6.1 to work with OpenCV3 libraries

    HOWTO: Setup XCode 6.1 to work with OpenCV3 libraries Overview This post demonstrates how to setup y ...

  2. dpkg --add-architecture i386 && apt-get update && > apt-get install wine32

    dpkg --add-architecture i386 && apt-get update &&> apt-get install wine32

  3. Mac解决:xcode-select: error: command line tools are already installed, use "Software Update" to install updates

    1.因为node项目终端报错: No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. No receipt for 'com ...

  4. Linux YUM (Yellowdog Updater, Modified) Commands for Package Management

    Linux YUM (Yellowdog Updater, Modified) Commands for Package Management In this article, we will lea ...

  5. Update Node.js Package.json

    Update the latest package while using node.js, follow the command as following. npm i -g npm-check-u ...

  6. sublime 快速安装多个插件的两种方法[Advanced Install Package]与[Package Control.sublime-settings]

    环境 sublime 3,目前官网下载的sublime3 已经支持自动安装 Package Control . 第一种: ctrl+shift+p 调出命令面板以后 以前都是使用 Package Co ...

  7. 最新版Sublime Text Build 3156 x64 的下载 + 注册码 + Install Package Control + 汉化教程

    一.Sublime Text  下载 神器 Sublime Text 最近开始更新到开发版本 Build 3156,本身英语不是太6,汉化党自然各种百度汉化教程,网上不是一堆绿色汉化包,就是让你下载汉 ...

  8. sublime Text3下载与安装以及解决安装Install Package时遇见的问题

    最近下载安装sublime Text3后,在安装Install Package时遇到了几个问题,网上搜了一大圈终于解决了,特此记录为以后之便. 一.下载安装sublime Text3 1.sublim ...

  9. 解决sublime text 3使用Install Package时出现There are no packages available for installation问题

    package control一直弹出There are no packages available for installation,由于国内环境屏蔽了https://packagecontrol. ...

随机推荐

  1. iOS-UI控件精讲之UIView

    道虽迩,不行不至:事虽小,不为不成. 相关阅读 1.iOS-UI控件精讲之UIView(本文) 2.iOS-UI控件精讲之UILabel ...待续 UIView是所有UI控件的基类,在布局的时候通常 ...

  2. XhProf安装教程–详细教程

    wget去这里找最新的包下载,我现在最新的是xhprof-0.9.4.tgz cd /tmp mkdir xhprof && cd xhprof wget http://pecl.ph ...

  3. Function.prototype.apply()

    文章地址:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply ...

  4. java中的包装类

    每一个包装类都对应一种基本数据类型.包装类有:Integer.character.Byte.Short.Long.Floot.Double.Boolean这八种,分别对应的基本数据类型是:int.ch ...

  5. python中的“引用”和C++的引用

    python并不刻意区分“按值传递”和“按引用传递”. 在底层,python将值分为不可变对象(比如int,str)和可变对象(比如列表).所有的变量都是对某个对象的引用,赋值(=)和函数参数传递,都 ...

  6. poj 1170 Shopping Offers

    Shopping Offers Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 4696   Accepted: 1967 D ...

  7. Mysql 数据库表操作

    ☞ 创建表CREATE TABLE `数据库`.`表` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT COMMENT '注释',`type_name` VARCHA ...

  8. web常用正则表达式

    1. 平时做网站经常要用正则表达式,下面是一些讲解和例子,仅供大家参考和修改使用: 2. "^\d+$" //非负整数(正整数 + 0) 3. "^[0-9]*[1-9] ...

  9. 【C语言】printf函数详解

    C语言printf函数详解 一.相关基础知识 请求printf()打印变量的指令取决于变量的类型,例如打印整数用%d符号,打印字符用%c符号,这些符号称为转换说明(conversion specifi ...

  10. POJ 2049 Finding Nemo bfs 建图很难。。

    Finding Nemo Time Limit: 2000MS   Memory Limit: 30000K Total Submissions: 6952   Accepted: 1584 Desc ...