[root@localhost /]# mkdir /haha
[root@localhost /]# mount /dev/cdrom /haha/
[root@localhost /]# cd /haha/
[root@localhost haha]# ls
AppStream EULA images RPM-GPG-KEY-redhat-beta
BaseOS extra_files.json isolinux RPM-GPG-KEY-redhat-release
EFI GPL media.repo
[root@localhost haha]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ls
[root@localhost yum.repos.d]# vim haha.repo
[AppStream]
name=AppStream
baseurl=file:///haha/AppStream
gpgcheck=0
enabled=1
[BaseOS]
name=BaseOS
baseurl=file:///haha/BaseOS
gpgcheck=0
enabled=1
[root@localhost yum.repos.d]# dnf makecache
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use "rhc" or "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@localhost yum.repos.d]# dnf repolist
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use "rhc" or "subscription-manager" to register.
repo id repo name
AppStream AppStream
BaseOS BaseOS