Linux7.5配置yum源
一、配置yum文件
[root@oracle19c yum.repos.d]# pwd
/etc/yum.repos.d
[root@oracle19c yum.repos.d]# cat rhel.repo
[rhel]
name=rhel
baseurl=file:///mnt
gpgcheck=0
enabled=1
二、mount ISO到yum目录
[root@oracle19c ~]# mount -o loop rhel-server-7.5-x86_64-dvd.iso /mnt
mount: /dev/loop0 is write-protected, mounting read-only
三、检查是否正常
[root@oracle19c yum.repos.d]# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
repo id repo name status
rhel rhel 5,099
repolist: 5,099
以上。