当前位置:网站首页>RedHat7.4配置yum软件仓库(RHEL7.4)
RedHat7.4配置yum软件仓库(RHEL7.4)
2022-07-05 18:33:00 【InfoQ】
yum软件仓
实验准备(以下实验都在VMware中进行)
1、挂载光盘镜像
2、查看
[[email protected] ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 19G 0 part
├─rhel-root 253:0 0 17G 0 lvm /
└─rhel-swap 253:1 0 2G 0 lvm [SWAP]
sdb 8:16 0 10G 0 disk
sr0 11:0 1 3.8G 0 rom /run/media/root/RHEL-7.4 Server.x86_64 ---这就是已经挂载商店光盘镜像
3、创建挂载点并写入配置文件
[[email protected] ~]# mkdir /media/cdrom
[[email protected] ~]# vim /etc/fstab
/dev/cdrom /media/cdrom iso9660 defaults 0 0 ---添加这一行
[[email protected] ~]# mount -a
mount: /dev/sr0 is write-protected, mounting read-only
4、写yum仓的配置文件
[[email protected] ~]# cd /etc/yum.repos.d/
[[email protected] yum.repos.d]# vim rhel7.repo
[rhel] ---Yum软件仓库唯一标识符,避免与其他仓库冲突
name=rhel ---Yum软件仓库的名称描述
baseurl=file:///media/cdrom ---提供的方式包括FTP(ftp://..)、HTTP(http://..)、本地(file:///..)
enable=1 ---设置此源是否可用;1为可用,0为禁用。
gpgcheck=0 ---设置此源是否校验文件;1为校验,0为不校验
5、清除yum仓库缓存
[[email protected] yum.repos.d]# yum clean all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Cleaning repos: rhel
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
6、生成缓存
[[email protected] yum.repos.d]# yum makecache
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
rhel | 4.1 kB 00:00
(1/5): rhel/group_gz | 137 kB 00:00
(2/5): rhel/filelists_db | 3.4 MB 00:00
(3/5): rhel/primary_db | 4.0 MB 00:00
(4/5): rhel/other_db | 1.5 MB 00:00
(5/5): rhel/productid | 1.6 kB 00:00
Metadata Cache Created
7、试验是否安装成功
[[email protected] ~]# yum install tree -y
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-
: manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package tree.x86_64 0:1.6.0-10.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
tree x86_64 1.6.0-10.el7 rhel 46 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 46 k
Installed size: 87 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : tree-1.6.0-10.el7.x86_64 1/1
Verifying : tree-1.6.0-10.el7.x86_64 1/1
Installed:
tree.x86_64 0:1.6.0-10.el7
Complete!
[[email protected] ~]#
边栏推荐
- Share: ZTE Yuanhang 30 Pro root unlock BL magick ZTE 7532n 8040n 9041n brush mask original brush package root method Download
- 开户注册股票炒股安全吗?有没有风险的?靠谱吗?
- 2022 latest Android interview written examination, an Android programmer's interview experience
- sample_rate(采样率),sample(采样),duration(时长)是什么关系
- 爬虫01-爬虫基本原理讲解
- 技术分享 | 常见接口协议解析
- The 11th China cloud computing standards and Applications Conference | cloud computing national standards and white paper series release, and Huayun data fully participated in the preparation
- The origin of PTS, DTS and duration of audio and video packages
- 小程序 修改样式 ( placeholder、checkbox的样式)
- sample_rate(采樣率),sample(采樣),duration(時長)是什麼關系
猜你喜欢
vulnhub之darkhole_2
Chinese postman? Really powerful!
Thoroughly understand why network i/o is blocked?
小程序 修改样式 ( placeholder、checkbox的样式)
案例分享|金融业数据运营运维一体化建设
MYSQL中 find_in_set() 函数用法详解
Rse2020/ cloud detection: accurate cloud detection of high-resolution remote sensing images based on weak supervision and deep learning
Case sharing | integrated construction of data operation and maintenance in the financial industry
2022 latest intermediate and advanced Android interview questions, [principle + practice + Video + source code]
buuctf-pwn write-ups (9)
随机推荐
中文版Postman?功能真心强大!
Reptile 01 basic principles of reptile
Whether to take a duplicate subset with duplicate elements [how to take a subset? How to remove duplicates?]
LeetCode 6109. Number of people who know the secret
2022最新中高级Android面试题目,【原理+实战+视频+源码】
The origin of PTS, DTS and duration of audio and video packages
[QNX Hypervisor 2.2用户手册]6.3.2 配置VM
node_exporter内存使用率不显示
蚂蚁集团开源可信隐私计算框架「隐语」:开放、通用
Is it safe to make fund fixed investment on access letter?
The easycvr platform reports an error "ID cannot be empty" through the interface editing channel. What is the reason?
ROS安装报错 sudo: rosdep:找不到命令
视频自监督学习综述
How much does the mlperf list weigh when AI is named?
进程间通信(IPC):共享内存
IDEA配置npm启动
在通达信上做基金定投安全吗?
lombok @Builder注解
解决 contents have differences only in line separators
Notes on common management commands of openshift