#cd /etc/yum.repo.d
修改yum配置源
#vim redhat.repo
i 插入命令
将以下内容插入redhat.repo 文件
[BaseOS]
name=BaseOS
enabled=1
gpgcheck=0
baseurl=file:///run/media/user/RHEL-8-0-0-BaseOS-x86_64/BaseOS
[Appstream]
name=Appstream
enabled=1
gpgcheck=0
baseurl=file://run/media/user/RHEL-8-0-0-BaseOS-x86_64/Appstream
查看yum配置信息
#yum repolist
在安装增强文件之前安装相应的包,安装后重启
#yum install kernel-headers
#yum install kernel-devel
#yum install gcc*
#yum install make
#yum install elfutils-libelf-devel
重启虚拟机再次安装增强功能插件
1.自动安装
“设备-安装增强功能”
2.命令行执行
在光驱目录下找到VBoxLinuxAdditions.run文件,执行VBoxLinuxAdditions.run文件安装增强功能。
#sh VBoxLinuxAdditions.run
安装过程报错
报错:
ValueError:File context for /opt/VBoxGuestAdditions-6.1.34/other/mount.vboxs
报错处理__执行以下命令
#semanage fcontext -d /opt/VBoxGuestAdditions-6.1.34/other/mount.vboxsf
#restorecon /opt/VBoxGuestAdditions-6.1.34/other/mount.vboxsf