How to install VirtualBox 5.1 to RHEL/CentOS and Fedora

  • by
  • 4 Months ago
  • 0

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.

how-to-install-virtualbox-5-1-to-rhel_centos-and-fedora

 

 

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 -------------
/usr/lib/virtualbox/vboxdrv.sh setup

------------- Fedora 18-16 and CentOS/RHEL 6/5 -------------

/etc/init.d/vboxdrv setup

## OR ##

service vboxdrv setup

 

 

6. Now replace the user_name

Replace with your own user name in the command below

# usermod -a -G vboxusers user_name

Original source http://www.tecmint.com/install-virtualbox-on-redhat-centos-fedora/

  • facebook
  • googleplus
  • twitter
  • linkedin
  • linkedin