My environment is CENTOS7, so it can also be said to use Yum to install VirtualBox under CENTOS7, but for other Linux distribution methods are the same.
The following actions are performed on the command line.
1, first need to configure the source of Yum.
Go to directory cd/etc/yum.repos.d/, here is where Yum places the software source, and the source we configured is placed here.
If your Linux distribution is fedora, then execute the following command:
wget http://Download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
If your Linux distribution is REH or CentOS, execute the following command:
wget http://Download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
After execution, you will see a virtualbox repo file under your current directory (that is,/etc/yum.repos.d/). The contents are as follows:
$ cat/etc/yum.repos.d/virtualbox.repo
[virtualbox]name=oracle linux/rhel/centos-$releasever/$basearch- virtualboxbaseurl=http:// download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearchenabled=1Gpgcheck =1Repo_gpgcheck=1gpgkey=https://www.virtualbox.org/ DOWNLOAD/ORACLE_VBOX.ASC
2. Update source
Execute command:
Yum Upgrade
3, installation VirtualBox
Yum Install virtualbox-5.0
Content Source:http://blog.csdn.net/statdm/article/details/7756788
Installing VirtualBox virtual machines with Yum