当前位置:网站首页>Redhat7.4 configure Yum software warehouse (rhel7.4)
Redhat7.4 configure Yum software warehouse (rhel7.4)
2022-07-05 18:46:00 【InfoQ】
yum Software warehouse
Experiment preparation ( The following experiments are VMware In the middle of )
1、 Mount the CD image
2、 see
[[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 --- This is the image of the attached store CD
3、 Create a mount point and write to the configuration file
[[email protected] ~]# mkdir /media/cdrom
[[email protected] ~]# vim /etc/fstab
/dev/cdrom /media/cdrom iso9660 defaults 0 0 --- Add this line
[[email protected] ~]# mount -a
mount: /dev/sr0 is write-protected, mounting read-only
4、 Write yum Configuration file of warehouse
[[email protected] ~]# cd /etc/yum.repos.d/
[[email protected] yum.repos.d]# vim rhel7.repo
[rhel] ---Yum Software warehouse unique identifier , Avoid conflicts with other warehouses
name=rhel ---Yum Description of the name of the software warehouse
baseurl=file:///media/cdrom --- The ways provided include FTP(ftp://..)、HTTP(http://..)、 Local (file:///..)
enable=1 --- Set whether this source is available ;1 Available for use ,0 To disable .
gpgcheck=0 --- Set whether this source verifies files ;1 For verification ,0 For not checking
5、 eliminate yum Warehouse cache
[[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、 Generate cache
[[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、 Test whether the installation is successful
[[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] ~]#
边栏推荐
- Deep copy and shallow copy [interview question 3]
- 2022 latest Android interview written examination, an Android programmer's interview experience
- ROS installation error sudo: rosdep: command not found
- c语言简便实现链表增删改查「建议收藏」
- 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
- websocket 工具的使用
- 技术分享 | 接口测试价值与体系
- Ant group open source trusted privacy computing framework "argot": open and universal
- AI Open2022|基于异质信息网络的推荐系统综述:概念,方法,应用与资源
- 如何写出好代码 - 防御式编程
猜你喜欢
Pytorch yolov5 training custom data
技术分享 | 常见接口协议解析
深入底层C源码讲透Redis核心设计原理
Reading notes of Clickhouse principle analysis and Application Practice (5)
Summary of six points of MySQL optimization
小程序 修改样式 ( placeholder、checkbox的样式)
Trust counts the number of occurrences of words in the file
爬虫01-爬虫基本原理讲解
怎么自动安装pythn三方库
Reptile 01 basic principles of reptile
随机推荐
怎么自动安装pythn三方库
2022最新中高级Android面试题目,【原理+实战+视频+源码】
@Extension, @spi annotation principle
Copy the linked list with random pointer in the "Li Kou brush question plan"
集合处理的利器
About statistical power
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
什么是文本挖掘 ?「建议收藏」
Introduction to the development function of Hanlin Youshang system of Hansheng Youpin app
The 11th China cloud computing standards and Applications Conference | China cloud data has become the deputy leader unit of the cloud migration special group of the cloud computing standards working
快速生成ipa包
The easycvr authorization expiration page cannot be logged in. How to solve it?
MySQL优化六个点的总结
XML基础知识概念
How to write good code defensive programming
使用文件和目录属性和属性
跨境支付平台 XTransfer 的低代码实践:如何与其他中台融合是核心
ICML2022 | 长尾识别中分布外检测的部分和非对称对比学习
Problems encountered in the project u-parse component rendering problems
Low code practice of xtransfer, a cross-border payment platform: how to integrate with other medium-sized platforms is the core