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. Masonry等比缩放

    第一种: CGFloat width = CGRectGetWidth([[UIScreen mainScreen] bounds]);         CGFloat aspectRatio = 1 ...

  2. UITabBar-UITabBarItem图片的背景颜色属性和文字的颜色大小设置

    UITabBarItem设置的图片选中状态下默认的是蓝色,如何改变它的颜色为图片自带的颜色呢? typedef NS_ENUM(NSInteger, UIImageRenderingMode) { / ...

  3. HDU_1241 Oil Deposits(DFS深搜)

    Problem Description The GeoSurvComp geologic survey company is responsible for detecting underground ...

  4. 制作Net程序的帮助文档--总结

    一.工具的准备 目前,一般采用Sandcastle Help File Builder工具来制作.Net程序帮助文档,该工具主要是利用Xml文档里的信息以及DLL文件来生成完整的帮助文档.在Visua ...

  5. CentOS 6.4 64位 安装 mysql 5.6.24

    下载安装包 由于官网访问及版本选择下载不太方便,使用 suho 的源进行下载 http://mirrors.sohu.com/mysql/MySQL-5.6/ 下载如下三个安装包: MySQL-ser ...

  6. tupian

     http://www.iconfont.cn/https://icons8.com/http://ico.58pic.com/http://www.easyicon.net/ 

  7. MVC中的文件上传-小结

    web开发中,文件的上传是非常基本功能之一. 在asp.net中,通常做法是利用webservice 来接收文件请求,这样做的好处就是全站有了一个统一的文件上传接口,并且根据网站的实际情况,可以将we ...

  8. 在win10 64位下编译,提示[C++ Error] E2075 Incorrect project override option: (x86)\borland\cbuilder6\lib\vcl60.csm

    options->compiler  右边有个file name 改下就好了从$(BCB)\lib\vcl60.csm 改为c:\PROGRA~1\borland\CBUILD~1\lib\vc ...

  9. 新增的output元素 progress元素 meter元素 keygen元素

    结果图 <output>是双标签 name:定义对象的唯一属性 for:定义输出域相关的一个或多个元素. form:定义所属的一个至多个表单. progress和meter一般和JS一起使 ...

  10. 博客系统-3.0CodeIgniter系统SAE版本的配置 application/config/

    autoload.php(系统启动时自动加载的文件:包,类库,驱动,方法助手,配置) $autoload['libraries'] = array('database', 'access', 'pag ...