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 ...
随机推荐
- 在JS中如何判断所输入的是一个数、整数、正数、非数值?
1.判断是否为一个数字: Number(num)不为 NaN,说明为数字 2. 判断一个数为正数: var num=prompt("请输入:"); if(Number(num)&g ...
- Vue生命周期中mounted和created的区别
参考链接:https://blog.csdn.net/xdnloveme/article/details/78035065
- python:函数和循环判断
输出显示 先说一下最基础的输出: print('hello world') 唯一值得提到是字符串的format函数. format函数代替了C中的%s. print('{0} say:{0} {1}. ...
- SQL Server - case when...then...else...end
Case具有两种格式.简单Case函数和Case搜索函数. --简单Case函数 CASE sex ' THEN '男' ' THEN '女' ELSE '其他' END --Case搜索函数 ' T ...
- centos 6 部署Nodejs
线上环境需要一套nodjs,没话说,那就部署唠. 一.下载编译包.解压.软链 nodjs历史版本连接:https://nodejs.org/zh-cn/download/releases/ cd /u ...
- redis 资料
redis是什么: Redis is an open source, BSD licensed, advanced key-value store. It is often referred to a ...
- for/while循环运用(do while)
//for循环用于知道次数的循环,while用于不知道的次数的循环//第1种写法 while循环 import java.util.Scanner;//插入util工具包 public class H ...
- Python知识目录
目录 一.计算机基础 二.Python基础 三.函数 四.常用模块 五.模块和包 六.面向对象 七.网络编程socket 八.数据库 九.前端 十.Python Web框架 十一.版本控制--GIT ...
- Python3 元组(tuple)
一.定义:不可变序列的数据元素集合,元组的元素是不可以修改的 元组使用小括号,例如:tuple = (1,) 注意:即使元组里面只有一个元素,该元素后面也要加 ",":在函数传递参 ...
- element-ui修改全局样式且只作用于当前页面
1)修改组件的样式,但是只作用于当前页面,其他页面不受影响,做法有两种: 法一:使用关键字“/deep/” 1)在当前页面添加样式: <style lang="scss" s ...