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
1 2 |
$ 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:
1 2 3 4 5 6 |
[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
1 2 3 |
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.
1 2 3 |
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.
1 |
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.
1 |
VirtualBox |
You will see this window popup:
Enjoy!