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. 关于AVD不能导入文件的解决方案

    安卓虚拟机导入文件时报以下异常: [2013-01-23 16:09:18 - ddms] transfer error: Read-only file system [2013-01-23 16:0 ...

  2. LINQ数据库连接对象制造工厂

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.D ...

  3. 怎样在win7上远程连接linux系统

    window操作系统的电脑 一台安装了linux系统的服务器 putty.exe小软件 方法/步骤   在前面的环境和软件都有的情况下,双击putty.exe软件,如下图:   在软件界面中的:Hos ...

  4. jQuery无刷新上传学习心得

    记得刚离开大学,进入目前这家公司不到一个月时,有一位前辈给我们当时的新人讲了下JS无刷新上传的相关知识. 在此之前,一直都是在使用C#提供的服务器上传控件FileUpload,但是每次使用时,都会刷新 ...

  5. 系统后台图表生成文档说明-javascript

    1.引入jquery插件文件datas.js 2.各图表分类 表格 $('#'+tableId).mTable({ url:'', //数据来源,[必填] pageNum:1, //分页,默认为1,[ ...

  6. 关于java中for和foreach循环

    for循环中的循环条件中的变量只求一次值!具体看最后的图片 foreach语句是java5新增,在遍历数组.集合的时候,foreach拥有不错的性能. foreach是for语句的简化,但是forea ...

  7. 网站商务通链接快速标识v1.0.js

    js代码为: function getSwt(keys){ try{ if(openZoosUrl&&typeof(openZoosUrl)=="function" ...

  8. odoo9 install

    odoo9 的安装需要 nodejs 的 lessc 命令. 需要先安装nodejs 后,使用nmp(nodejs的一个包管理工具) 安装lessc等功能. window 1:安装nodejs. 安装 ...

  9. DBA - 我的学习

    DBA - 我的学习 1. df -k 检查oracle 分区硬盘使用情况 2. 检查alert_<SID名称>.log, alert日志文件,检查是否新增错误日志 3. 检查数据文件的状 ...

  10. [BZOJ 1143] [CTSC2008] 祭祀river 【最长反链】

    题目链接:BZOJ - 1143 题目分析 这道题在BZOJ上只要求输出可选的最多的祭祀地点个数,是一道求最长反链长度的裸题. 下面给出一些相关知识: 在有向无环图中,有如下的一些定义和性质: 链:一 ...