Download

https://www.virtualbox.org/wiki/Linux_Downloads

[root@ec-c Downloads]# wget https://download.virtualbox.org/virtualbox/6.0.0/VirtualBox-6.0-6.0.0_127566_el7-1.x86_64.rpm

Install

#  or 
#  yum install VirtualBox-6.0-6.0.0_127566_el7-1.x86_64.rpm

[root@ec-c e.c.com]# yum install SDL

[root@ec-c e.c.com]# rpm -ivh /home/e.c.com/Downloads/VirtualBox-6.0-6.0.0_127566_el7-1.x86_64.rpm
警告:/home/e.c.com/Downloads/VirtualBox-6.0-6.0.0_127566_el7-1.x86_64.rpm: 头V4 DSA/SHA1 Signature, 密钥 ID 98ab5139: NOKEY
准备中...                          ################################# [100%]
正在升级/安装...
   1:VirtualBox-6.0-6.0.0_127566_el7-1################################# [100%]

Creating group 'vboxusers'. VM users must be member of that group!

This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-3.10.0-862.el7.x86_64
This system is currently not set up to build kernel modules.
Please install the gcc make perl packages from your distribution.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-3.10.0-862.el7.x86_64

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.
kernel driver not installed (rc=-1908)
[root@ec-c Downloads]# yum -y install kernel-devel
[root@ec-c Downloads]# yum -y install gcc

Restart

[root@ec-b Downloads]# /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.

or

[root@ec-c Downloads]# reboot