How I installed virtualbox 4.3 on CentOS 6.5 x86_64

I recently had to install virtualbox on CentOS 6.5 to debug a problem. It was a bit tricky so I decided to blog what I did.

All of these steps must be done as root unless otherwise specified.

Step 1: Install the EPEL repository

$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ yum repolist

Step 2: Create /etc/yum.repos.d/virtualbox.repo

It should contain this:

[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

Step 3: Install the necessary system packages

yum groupinstall -y 'Development Tools'
yum install -y kernel-devel
yum install -y dkms

Step 4: Install VirtualBox

The setup step may take some time.

yum list | grep -i virtualbox  # list the available choices
yum install VirtualBox-4.3  # choose the most recent one
service vboxdrv setup

Step 5: Add users to the vboxusers group

Substitute <your_user_name> with your user name.

usermod -a -G vboxusers <your_user_name>

Step 6: Run VirtualBox

This can be done as root or as one of the users in vboxusers group.

VirtualBox

You will see this window popup:

Screenshot

Enjoy!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.