VirtualBox is a software that created for virtualization and it is open source x-platform. It is possible to be installed in all operating systems and give to user the capability to install and run a lot of “guest” operating systems in the same machine. A simple example is that if you install it in your Linux machine, then, you can ran Windows OS as a GuestOS and also the opposite. Same concept applies to more OS, which means that you can compine more than 2 with only limitation is your hard drive capacity and ofcourse your systems memory.
Step by step guide for the installation of VirtualBox 5.1 to RHEL/CentOS and Fedora
1. In case you have already installed an older version of Virtual box, then you should remove it:
# yum remove VirtualBox-4*
2. Next step is to add the VirtualBox own repository in order to install the latest version of VirtualBox, which in this case is 5.1 to each one of the following systems:
For RHEL/CentOS 7/6/5
# cd /etc/yum.repos.d/ # wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
For RHEL/CentOS 5
# wget http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm # rpm -Uvh epel-release-5-4.noarch.rpm
For Fedora 24-12
# cd /etc/yum.repos.d/ # wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
3. In the next step we need to install Dependency Packages for VirtualBox
Kernel mode vboxdrv is used by VirtualBox for memory control and allocation and also to execute operating systems of guests. Even thought that’s important,
you can still use VirtualBox for the creation/configuration of VMs(Virtual Machines) but VMs are not going to work. So in order for VirtualBox to become 100%
functional first thing you have to do is to update your system and after that you have to install those modules: DKMS, kernel-headers and kernel-devel. Last but
not least you must install some dependency packages.
# yum update # yum install binutils qt gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms
4. Next step is installing the VirtualBox 5.1
If you’ve followed the instructions and you fully installed the packages mentioned earlier in this article, now you should be able to
install the latest version of VirtualBox by typing:
# yum install VirtualBox-5.1
5. Step no5 will show you how to rebuilt Kernel modules needed.
In case the build process does not complete, you will get some warning messages. If this happens, check var/log/vbox-install.log so you can
trace the reason for that failure.
------------- Fedora 24-19 and CentOS/RHEL 7 -------------