1. Mount the RHEL 7 installation media ISO to some directory. For example /mnt :

# mount -o loop rhel7.iso /mnt

2. Copy the media.repo file from the mounted directory /mnt /etc/yum.repos.d/ and name it as rhel7.repo.

# cp /mnt/media.repo /etc/yum.repos.d/rhel7.repo

3. Give appropriate permissions to the repository file.

# chmod 644 /etc/yum.repos.d/rhel7.repo

4. Modify the repo file and change the parameter gpgcheck=0 to gpgcheck=1 and add below 3 lines to the same file.

enabled=1
baseurl=file:///mnt/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

5. Once you have done all the changes, the final repo file shiould look like below.( Note that – media-id may be different depending on the version of RHEL for which DVD is used)

[InstallMedia]
name=DVD for Red Hat Enterprise Linux 7.3 Server
mediaid=9859238196.834790
metadata_expire=-1
gpgcheck=1
cost=500
enabled=1
baseurl=file:///mnt/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

6. Make sure you clear the related caches by yum clean all and subscription-manager clean once.

# yum clean all
# subscription-manager clean

CentOS / RHEL 7 : How to setup yum repository using locally mounted DVD的更多相关文章

  1. PHP 5.4 on CentOS/RHEL 6.4 and 5.9 via Yum

    PHP 5.4 on CentOS/RHEL 6.4 and 5.9 via Yum PHP 5.4.16 has been released on PHP.net on 6th June 2013, ...

  2. [转载]PHP 5.6 on CentOS/RHEL 7.0 and 6.6 via Yum

    https://webtatic.com/packages/php56/ PHP 5.6.5 has been released on PHP.net on 22nd January 2014, an ...

  3. 【Linux笔记】CentOS&RHEL YUM基础知识

    以下内容收集自网络,以作参考. 一.YUM是什么 YUM = Yellow dog Updater, Modified. 主要功能是更方便的添加/删除/更新RPM包. 它能自动解决包的倚赖性问题. 它 ...

  4. PHP 5.4 on CentOS/RHEL 7.0, 6.5 and 5.10 via Yum

    PHP 5.4.36 has been released on PHP.net on 18th December 2014, and is also available for CentOS/RHEL ...

  5. 【Linux】YUM Repositories for CentOS, RHEL & Fedora Systems

    这里是官方wiki:https://wiki.centos.org/AdditionalResources/Repositories 一.简介 YUM(Yellowdog Updater Modifi ...

  6. CentOS / RHEL 配置yum源

    CentOS / RHEL 配置yum源 */--> CentOS / RHEL 配置yum源 Table of Contents 1. 前言 2. 关于yum 2.1. yum是什么 2.2. ...

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

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

  8. centos/RHEL 7.6 使用yum安装php7.3(方便wordpress的php7.3需求,并解决了libphp7.so缺失问题)

    我最近想安装一个wordpress, 但是官网介绍需要php7.3以上版本,但是百度了一下,都是要编译安装. 为此,我想,centos..., php... 两大当红辣子鸡没有yum安装方式,简直不可 ...

  9. Install LAMP Server (Apache, MariaDB, PHP) On CentOS/RHEL/Scientific Linux 7

    Install LAMP Server (Apache, MariaDB, PHP) On CentOS/RHEL/Scientific Linux 7 By SK  - August 12, 201 ...

随机推荐

  1. js高级知识---词法分析和AO 链

    转载自https://www.cnblogs.com/OceanHeaven/p/4957704.html 上面一篇文章说了js的作用域链,这一节算是对上面的延申,有一个典型的例子,首先看原来的一段代 ...

  2. Node.js使用jszip实现打包zip压缩包

    一.前言 最近有这样的一个需求,需要把两个同名的.mtl文件和.obj文件打包成一个同名的.zip压缩包.刚开始文件不多的时候,只有几个,或者十几个,甚至二三十个的时候,还能勉强接受手动修改,但是随着 ...

  3. Linux下间隔多少秒 (即以秒为单位) 去执行某条命令或某个shell脚本的操作方法【转】

    在日常运维工作中, 经常会碰到以秒为单位去定时执行某些命令或监控脚本的需求. 说到定时任务就要用到crontab,通常来说,crontab的最小单位是分钟级别,要想实现秒级别的定时任务,就要进行特殊设 ...

  4. liunx系统下调整Swap分区大小

    作者:邓聪聪 添加swap交换空间的步骤如下:第一步:确保系统中有足够的空间来用做swap交换空间,准备在一个独立的文件系统中添加一个swap交换文件,在/tmp中添加1G的swap交换文件第二步:添 ...

  5. appJSON["window"]["navigationBarTextStyle"] 字段需为 black 或 white

    appJSON["window"]["navigationBarTextStyle"] 字段需为 black 或 white     改动成这个就可以了 &qu ...

  6. df -h hang 问题

    此处仅截取原文中的解决方案,以便快速查找解决方法. 解决方法如下:1. systemctl restart proc-sys-fs-binfmt_misc.automount; 2. 升级到最新 sy ...

  7. Java Spring Boot VS .NetCore (八) Java 注解 vs .NetCore Attribute

    Java Spring Boot VS .NetCore (一)来一个简单的 Hello World Java Spring Boot VS .NetCore (二)实现一个过滤器Filter Jav ...

  8. xilinx和altera的fpga的不同之处!----如果不知道,你将为之付出代价! --转载

    本人从2004年接触fpga开始,至今已经8年了.开发过altera的flex系列和cyclone3系列:开发过xilinx的vii和v5系列.下面谈谈本人对二者的一些不同,以便引起开发者对一些细节上 ...

  9. php正则验证车牌格式的函数

    /** * 判断是否合法车牌号 * @name isCarLicense * @param $license * @return bool */ function isCarLicense($lice ...

  10. Android+openCV 的坑

    之前一直用IntelliJ IDEA 导入 opencv_android_sdk 的 java 包,在最后一步finish时,始终出错. 后来重新安装Android Studio 重复以上步骤,能顺利 ...