VirtualBox installation on Centos

VirtualBox 4.3.12 Installation on Centos

VirtualBox is powerful Cross-platform Virtualization Software for x86-based systems. “Cross-platform” means that it installs on Windows, Linux, Mac OS X and Solaris x86 computers. And “Virtualization Software” means that you can create and run multiple Virtual Machines, running different operating systems, on the same computer at the same time. For example, you can run Windows and Linux on your Mac, run Linux and Solaris on your Windows PC, or run Windows on you Linux systems.

This article deals with the step by step installation process of Oracle VirtualBox 4.3.12 on RHEL clones such as CentOS and Fedora systems using Yum.

You’ll need to be the root user to start the installation process. Commands are assumed to be executed from a bash shell.

First check the current kernel version which is installed in your machine. Enter the following commands in Terminal to check the versions.

[root@localhost ~]# uname -r

Then update the current kernel and install all required packages to run VirtualBox. The below commands will do it for you.

[root@HostDire ~]# yum update kernel

[root@HostDire ~]# yum install gcc make patch dkms qt libgomp kernel-headers kernel-devel fontforge binutils glibc-headers glibc-devel

Make sure that you reboot after the upgrade to load the new kernel.

Now we can proceed with the installation using yum.

Change directory to /etc/yum.reposes.d/ which is the default yum repository folder in Centos, “.repo” files are located in this folder.

[root@HostDire ~]# cd /etc/yum.repos.d/

Download the repo file into your yum repository folder.

[root@localhost yum.repos.d]# wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

You can use cat command to view the details specified in that repo file.

[root@HostDire yum.repos.d]# cat virtualbox.repo
[virtualbox] name=Oracle Linux / RHEL / CentOS-$releasever / $basearch – VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch
enabled=1
gpgcheck=1
gpgkey=http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc
[root@HostDire yum.repos.d]#

If you are a Fedora user then download repo file from the following URL.

[root@HostDire ~]# wget  http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo

After enabling  repository issue the command “yum info” to verify the current version available in the yum repository.

From the output “yum info” command you will get a clear idea about the VirtualBox version available in the downloaded yum repository.

The output of this command looks like this:

[root@HostDire ~]# yum info VirtualBox-4.3
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* atomic: mir01.syntis.net
* base: centos.excellmedia.net
* epel: epel.mirror.net.in
* extras: centos.excellmedia.net
* rpmforge: mirror.oscc.org.my
* updates: centos.excellmedia.net
Installed Packages
Name : VirtualBox-4.3
Arch : x86_64
Version : 4.3.12_93733_el6
Release : 1
Size : 148 M
Repo : installed
From repo : virtualbox
Summary : Oracle VM VirtualBox
URL : http://www.virtualbox.org/
License : GPLv2
Description : VirtualBox is a powerful PC virtualization solution allowing
: you to run a wide range of PC operating systems on your Linux
: system. This includes Windows, Linux, FreeBSD, DOS, OpenBSD
: and others. VirtualBox comes with a broad feature set and
: excellent performance, making it the premier virtualization
: software solution on the market.

[root@HostDire ~]#

Finally you can issue the following command to install VirtualBox-4.3. This command will create automatically vboxusers users and group.

[root@HostDire ~]# yum install VirtualBox-4.3

Sample output is as follows:

[root@HostDire ~ ]# yum install VirtualBox-4.3
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* atomic: mir01.syntis.net
* base: centos.excellmedia.net
* epel: epel.mirror.net.in
* extras: centos.excellmedia.net
* rpmforge: mirror.oscc.org.my
* updates: centos.excellmedia.net
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package VirtualBox-4.3.x86_64 0:4.3.12_93733_el6-1 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

===================================================================
Package Arch Version Repository Size
===================================================================
Installing:
VirtualBox-4.3 x86_64 4.3.12_93733_el6-1 virtualbox 73 M

Transaction Summary
===================================================================
Install 1 Package(s)

Total download size: 73 M
Installed size: 148 M
Is this ok [y/N]: y
Downloading Packages:
VirtualBox-4.3-4.3.12_93733_el6-1.x86_64.rpm | 73 MB 05:29
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : VirtualBox-4.3-4.3.12_93733_el6-1.x86_64 1/1

Creating group ‘vboxusers’. VM users must be member of that group!

No precompiled module for this kernel found — trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.

Stopping VirtualBox kernel modules [ OK ] Uninstalling old VirtualBox DKMS kernel modules [ OK ] Trying to register the VirtualBox kernel modules using DKMS [ OK ] Starting VirtualBox kernel modules [ OK ] Verifying : VirtualBox-4.3-4.3.12_93733_el6-1.x86_64 1/1

Installed:
VirtualBox-4.3.x86_64 0:4.3.12_93733_el6-1

Complete!
[root@HostDire ~]#

Finally we need to Rebuild kernel modules with following command:

[root@HostDire ~]# /etc/init.d/vboxdrv setup

That’s it! You now have VirtualBox installed on your server. You can use launcher from menu or below command to start VirtualBox.

[root@HostDire ~]# virtualbox &

Total
0
Shares
Leave a Reply

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

Related Posts