RHEL 8 配置光盤 yum 源

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
相關文章
相關標籤/搜索