[root@localhost ~]# mount /dev/cdrom /mnt mount: /dev/sr0 写保护,将以只读方式挂载 [root@localhost ~]# cd /etc/yum.repos.d/ [root@localhost yum.repos.d]# vi redhat-base.repo [root@localhost yum.repos.d/]# cat redhat-base.repo [local] name=Red Hat Enterprise Linux 7.6 baseurl=file:///mnt enabled=1 gpgcheck=1 gpgkey=file:///mnt/RPM-GPG-KEY-redhat-releas [root@localhost yum.repos.d]# ls redhat-base.repo redhat.repo [root@localhost yum.repos.d]# rm -r redhat.repo rm:是否删除普通空文件 "redhat.repo"?y [root@localhost yum.repos.d]# yum clean all 已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. 正在清理软件源: local [root@localhost yum.repos.d]# yum install net-tools 已加载插件:langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an entitlement server. You can use subscription-manager to register. local | 4.3 kB 00:00:00 (1/2): local/group_gz | 146 kB 00:00:00 (2/2): local/primary_db | 4.2 MB 00:00:00 软件包 net-tools-2.0-0.24.20131004git.el7.x86_64 已安装并且是最新版本 无须任何处理



