Install VirtualBox without GUI or Headless

Scenario / Question:

How do I install VirtualBox on a linux server that does not have a GUI installed or Xorg.

Solution / Answer:

VirtualBox can be installed on a headless server, and can be controlled with VBoxManage and VBoxHeadless from the command line.

Install VirtualBox 3.0

There are two ways to install VirtualBox for RPM based systems.

#1 Download the VirtualBox RPM

Go to VirtualBox website and download RPM for you platform

Download VirtualBox

Install the RPM:

# rpm -Uvh <name of RPM file you downloaded>

#2 Install Yum style Repository

Download the following repo file to the directory /etc/yum.repos.d/

Centos / RedHat

Centos / Redhat VirtualBox Repo File

Fedora

Fedora VirtualBox Repo File

Install VirtualBox via Yum:

# yum install virtualbox

Now that VirtualBox is installed we need to learn how to control VirtualBox from the command line

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
Fabio Milano has written 79 articles for us. Fabio Milano is a certified RHCE, MCP, and CFOI. He runs an IT consulting and services company called RDS Support inc. Website:http://www.rdssupport.com
The information provided is for educational purposes only. All content including links and comments is provided "as is" with no warranty, expressed or implied. Use is at your own risk and you are solely responsible for what you do with it.

4 Comments so far

  1. manuel on July 22nd, 2011

    Yum not working for me

    root@server [~]# yum install virtualbox
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: centos.mirrors.tds.net
    * extras: mirror.sanctuaryhost.com
    * updates: centos.mirrors.tds.net
    virtualbox | 951 B 00:00
    virtualbox/primary | 4.3 kB 00:01
    virtualbox 17/17
    Excluding Packages in global exclude list
    Finished
    Setting up Install Process
    No package virtualbox available.
    Nothing to do

  2. [...] How do I control VirtualBox from the linux command line CLI Solution / Answer: Use the included tools VBoxManage and VBoxHeadless First Install VirtualBox from this post: “Install VirtualBox without GUI or Headless” [...]

  3. matt on September 29th, 2011

    Yum not working for me either. Same problem as Manual above.

  4. jozeff on December 30th, 2011

    Hi
    first load the repos
    —-
    cd /etc/yum.repos.d/

    ## Fedora 16/15/14/13/12 users
    wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo

    ## CentOS 6.1/6/5.7 and Red Hat (RHEL) 6.1/6/5.7 users
    wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

    hope that helps

Leave a reply