问题描述
[root@localhost ~]# yum install gcc
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.
错误:没有启用的仓库。
解决方案:
- 在 /etc/yum.repos.d 下创建 rhel8.repo配置文件
[BaseOS]
name=BaseOS
baseurl=file:///media/cdrom/BaseOS //yum软件仓库位置,指向光盘(iso)挂载点enabled=1 //1为开启,0为关闭
gpgcheck=0 //1为检查签名,0为不检查[Appstream]
name=AppStream
baseurl=file:///media/cdrom/AppStream
enabled=1
gpgcheck=0
- 进行挂载
[root@localhost ~]# mount /dev/cdrom /media/cdrom
- 清理缓存,建立数据源
[root@localhost ~]# yum makecache