[root@Server_b software]# vim /etc/yum.repos.d/local.repo
[root@Server_b software]# cat /etc/yum.repos.d/local.repo
[local]
name=RHEL 7.9 Local Repo
baseurl=file:///mnt/cdrom
enabled=1
gpgcheck=0[qq]
name=qq
baseurl=file:///root/software
gpgcheck=0
enabled=1
[root@Server_b software]# yum clean all
[root@Server_b software]# yum makecache
4 验证
[root@Server_b software]# yum search qq
已加载插件:product-id, search-disabled-repos, subscription-managerThis system is not registered with an entitlement server. You can use subscription-manager to register.========================================== N/S matched: qq ==========================================
linuxqq.x86_64 : QQ名称和简介匹配 only,使用“search all”试试。
[root@Server_b software]#