CentOS 7: Install VirtualBox for virtualization

This article will describe installing VirtualBox.

1 Install VirtualBox

Update kernel.

$ sudo yum update -y
$ sudo reboot

Install VirtualBox package.

$ sudo yum install -y kernel-devel
$ cat <<EOF | sudo tee /etc/yum.repos.d/virtualbox.repo
[virtualbox]
name=VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/rhel/\$releasever/\$basearch
gpgcheck=1
repogpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc
EOF
$ sudo yum install -y VirtualBox-5.1

2 Run VirtualBox

Run virtualbox command.

$ virtualbox

0001_VirtualBox.png