码迷,mamicode.com
首页 > 其他好文 > 详细

RHEL 8 配置光盘 yum 源

时间:2019-08-05 17:19:23      阅读:323      评论:0      收藏:0      [点我收藏+]

标签:文件夹   system   rip   cat   软件   yum   仓库   dir   enable   

RHEL 8.0 配置光盘 yum 源

RHEL 8 和 7,6 软件包位置不太一样,8 在光盘根目录 BaseOS 文件夹和 AppStream 文件夹里面,7 和 6 是在光盘根目录里面

# 挂载光盘镜像
[root@bogon ~]# mkdir rhel
[root@bogon ~]# mount /dev/cdrom /rhel

# 编辑 repo 文件
[root@bogon ~]# cat /etc/yum.repos.d/media.repo 
[BaseOS]
name=BaseOS
baseurl=file:///rhel/BaseOS
enabled=1
gpgcheck=0
[AppStream]
name=AppStream
baseurl=file:///rhel/AppStream
enabled=1
gpgcheck=0

# 建元数据缓存
[root@bogon ~]# yum makecache               
Failed to set locale, defaulting to C
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
AppStream                                                                                                                                                                                     3.1 MB/s | 3.2 kB     00:00    
BaseOS                                                                                                                                                                                        2.7 MB/s | 2.7 kB     00:00    
Metadata cache created.

# 查看仓库
[root@bogon ~]# yum repolist               
Failed to set locale, defaulting to C
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:00:06 ago on Mon Aug  5 16:37:58 2019.
repo id                                                                                                     repo name                                                                                                   status
AppStream                                                                                                   AppStream                                                                                                   4672
BaseOS   

RHEL 8 配置光盘 yum 源

标签:文件夹   system   rip   cat   软件   yum   仓库   dir   enable   

原文地址:https://blog.51cto.com/babyshen/2426762

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!