How to Install Oracle VirtualBox on CentOS 6/CentOS 7

Oracle VirtualBox can be install on Windows, Linux, Unix and Mac operating system. Oracle VirtualBox is open source virtualization software that allow you to install and run more than one virtual computers and operating system in one physical server and freely distributed and modified. The following step will show how to install Oracle VirtualBox on linux CentOS 6 or CentOS 7.

1. Go to yum.repos.d directory :

# cd /etc/yum.repos.d/

2. Download VirtualBox repo file for CentOS :

# wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

3. Start install by issue the following command :

# yum install VirtualBox-4.3 -y

Yum install result :

Running transaction
  Installing : VirtualBox-4.3-4.3.28_100309_el7-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  ]
Recompiling VirtualBox kernel modules [  OK  ]
Starting VirtualBox kernel modules [  OK  ]
  Verifying  : VirtualBox-4.3-4.3.28_100309_el7-1.x86_64                                        1/1

Installed:
  VirtualBox-4.3.x86_64 0:4.3.28_100309_el7-1

Complete!

4. During the installation of VirtualBox above, the command will automatically create vboxusers and create the necessary kernel modules if the development environment has been correctly configured. You should also create VirtualBox user to become a member of that group :

# cat /etc/group | grep vbox
vboxusers:x:992:

5. How to rebuild kernel modules :

# service vboxdrv setup
Stopping VirtualBox kernel modules                         [  OK  ]
Recompiling VirtualBox kernel modules                      [  OK  ]
Starting VirtualBox kernel modules                         [  OK  ]

6. Add VirtualBox User(s) to vboxusers Group :

# useradd --home /home/ehowstuff ehowstuff
# usermod -a -G vboxusers ehowstuff

7. You can start VirtualBox by issue the following command on the terminal :

# VirtualBox

or Go to “System Tools” -> “Oracle VM VirtualBox” :

See also  How to Install Oracle VirtualBox on Windows

install-virtualbox-CentOS7-1

You can start create your VM via the Oracle VM VirtualBox console :
install-virtualbox-CentOS7-2

Leave a Comment

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