CentOS / RHEL 7 : How to setup yum repository using locally mounted DVD
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的更多相关文章
- 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, ...
- [转载]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 ...
- 【Linux笔记】CentOS&RHEL YUM基础知识
以下内容收集自网络,以作参考. 一.YUM是什么 YUM = Yellow dog Updater, Modified. 主要功能是更方便的添加/删除/更新RPM包. 它能自动解决包的倚赖性问题. 它 ...
- 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 ...
- 【Linux】YUM Repositories for CentOS, RHEL & Fedora Systems
这里是官方wiki:https://wiki.centos.org/AdditionalResources/Repositories 一.简介 YUM(Yellowdog Updater Modifi ...
- CentOS / RHEL 配置yum源
CentOS / RHEL 配置yum源 */--> CentOS / RHEL 配置yum源 Table of Contents 1. 前言 2. 关于yum 2.1. yum是什么 2.2. ...
- 通过yum升级CentOS/RHEL最小化安装
1.如果你有安装CentOS / RHEL最小服务器安装,您可能有很多麻烦没有安装包 2.有一种方法来安装所有的包,需要一个基本的服务器,使用yum groupinstall命令 3.从最小的安装基本 ...
- centos/RHEL 7.6 使用yum安装php7.3(方便wordpress的php7.3需求,并解决了libphp7.so缺失问题)
我最近想安装一个wordpress, 但是官网介绍需要php7.3以上版本,但是百度了一下,都是要编译安装. 为此,我想,centos..., php... 两大当红辣子鸡没有yum安装方式,简直不可 ...
- 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 ...
随机推荐
- MVC控制器返回一个list 视图接收
控制器 public ActionResult InfoFrame() { List<Users> list = new List<Users>(); if (Session[ ...
- win10安装VMware v14.1.1.28517
一.下载 VMware v14.1.1.28517 下载地址(包含安装说明):http://www.downza.cn/soft/74728.html 二.VMware Workstation 14 ...
- tomcat7的安装与maven安装
tomcat7的安装与配置: 下载tomcat7 :wget 地址 解压:tar -zxvf 文件名 编辑tomcat目录下的conf下的server.xml文件: <Connector por ...
- EHCache:Eelment刷新后,timeToLiveSeconds失效了?
个人以为只要设定了timeToLiveSeconds,中间过程不管有没有访问,只要LiveSeconds时间到了,缓存就会失效.但是开发时发现并非如此,经过一番折腾,最终发现自己的理解是正确的,还是使 ...
- Python--可迭代对象,迭代器,生成器
记得在刚开始学Python的时候,看到可迭代对象(iterable).迭代器(iterator)和生成器(generator)这三个名词时,完全懵逼了,根本就不知道是啥意识.现在以自己的理解来详解下这 ...
- 原生javascript实现阻止浏览器默认行为与阻止事件冒泡
不同的浏览器之间存在兼容问题,在IE与标准浏览器之间存在很大的差异,所以在实现阻止浏览器默认行为和阻止事件冒泡就要考虑要它们之间的不同 /** * 取消冒泡 * @param {事件} e */ fu ...
- Zabbix告警发送邮件时附带性能图
脚本处理逻辑分析: 通过zabbix传递给脚本的message参数,筛选出报警信息的itemid; 通过itemid获取到图片并保存; 将报警信息和图片组装成html; 发送邮件. 后续脚本里面的处理 ...
- 如何连接LINUX服务器
1.WINDOW下连接 使用PUTTY连接,链接如下:https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html 下载安装后打开,运行 ...
- c/c++/java如何访问数据库(优秀博文)
(下面是c++) https://www.cnblogs.com/47088845/p/5706496.html https://www.cnblogs.com/shiyingzhi/p/7896 ...
- 枚举特性FlagsAttribute的用法
先看官方的解释:指示可以将枚举作为位域(即一组标志)处理. 看起来并不好理解,到底什么是作为位域处理? 其实说的通俗点就是用二进制的表示方式来处理数学集合概念中关于集合的或与非等运算方法. 有什么用 ...