This is a quick set of notes about the installation of VirtualBox-6.0 on CentOS 7.5. This OS is not explicitly listed on VirtualBox’s website, so..
Reference page: https://www.virtualbox.org/wiki/Linux_Downloads .
Install the appropriate key:
sudo yum install -y wget wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | rpm --import -
(You might want to change the wget command to use curl, but wget is handy to have so I installed it).
Create the repository:
The right content for the repository is located at https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo and currently it contains the following:
[virtualbox] name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc
You can now run “yum make-cache” and search VirtualBox:
VirtualBox-4.3.x86_64 : Oracle VM VirtualBox
VirtualBox-5.0.x86_64 : Oracle VM VirtualBox
VirtualBox-5.1.x86_64 : Oracle VM VirtualBox
VirtualBox-5.2.x86_64 : Oracle VM VirtualBox
VirtualBox-6.0.x86_64 : Oracle VM VirtualBox
Pick the version you need, in my case it’s 6.0:
sudo yum install -y VirtualBox-6.0
Accept adding Oracle’s keys to your keyring.
VirtualBox kernel module configuration:
Switch to user root, and the install the appropriate tools to build VirtualBox’ kernel extension:
sudo yum install -y kernel-devel gcc make perl
And let it do its stuff. Now we can finally do:
/sbin/vboxconfig