Install VirtualBox 5.1 for CentOS 7/RHEL 7

VirtualBox (aka Oracle VM VirtualBox) is an open-source “full virtualization” solution by Oracle Corporation. Basically it is a hypervisor, which makes it possible to install an unmodified OS on top of your existing host OS – these environments are generally termed as virtual machines or guest machines (the base machine the Host). Hypervisors i.e. VirtualBox provide a virtualization layer i.e. making it possible for the guest machines to access the abstracted hardware resources.

Presently, VirtualBox runs on Windows, Linux, Macintosh, and Solaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista, Windows 7, Windows 8, Windows 10), DOS/Windows 3.x, Linux (2.4, 2.6, 3.x and 4.x), Solaris and OpenSolaris, OS/2, and OpenBSD.
Note: if you’re not root, do use sudo.

Installation on CentOS 7

1. Add required repositories:
Download the virtualbox.repo at /etc/yum.repos.d/
# cd /etc/yum.repos.d/

For CentOS/RHEL Systems:
# wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

For Fedora Systems:
# wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
VirtualBox  repo
Enable EPEL repository – enables installation of lots of open source packages via Yum. As most of the dependencies (you’ll be installing at the next step) require epel repository enabled.
# yum -y install epel-release
OR,
RHEL/CentOS 7 64-Bit
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm
# rpm -ivh epel-release-7-8.noarch.rpm
2. Update, and install the dependencies:
# yum -y update
The dependencies:
# yum -y install gcc make patch  dkms qt libgomp
# yum -y install kernel-headers kernel-devel fontforge binutils glibc-headers glibc-devel
VirtualBox ready
3. Install VirtualBox:
# yum -y install VirtualBox-5.1
install VirtualBox
4. Verify:
# virtualbox
VirtualBox gui

Note: The above steps will work for RHEL 7 and Fedora as well.

Leave a Reply

Your email address will not be published. Required fields are marked *