Changes

Jump to: navigation, search

Installing VirtualBox 2 on a Linux Host

2,090 bytes added, 18:45, 16 March 2009
VirtualBox Linux Host Requirements
This chapter of [[VirtualBox 2 Essentials]] covers the requirements for and steps to install the full, pre-built binrary binary edition of VirtualBox on a Linux host.
VirtualBox may be installed on Linux using either Linux distribution specific package archives, or manually using a distribution neutral shell script based installer. Each of these methods will be covered in this chapter.
* '''SDL''' - Version 1.2.7 or newer of the ''libsdl'' graphics library must be installed.
AnotherIn addition, VirtualBox for Linux requires that the packages necessary to facilitate the building of Kernel modules be installed prior to installing the guest additions. This include the GNU C Compiler and kernel development sources. On Red Hat, CentOS and Fedora systems, this can be achieved by executing the following command as super user: <pre>suyum install gcc kernel-devel</pre> Another optional package is Dynamic Kernel Module Support (DKMS). As part of the installation process, VirtualBox installed installs two kernel modules (vboxdrv and vboxnetflt) onto the host system. These modules must match the running Linux kernel at all times for VirtualBox to function. This can be an issue when the host kernel is updated at any point in the future. Whilst not required to install and run VirtualBox , the presence of the DKMS package will ease the transition to future kernel updates. When installed, DKMS ensures that the VirtualBox kernel modules are rebuilt automatically when the Linux kernel is updated. Without this package, the VirtualBox kernel module will need to be rebuilt manually each time a kernel update is applied to the host system.
The DKMS package is not supported on all Linux distributions, but may be installed on those that do as follows:
== Downloading VirtualBox for Linux ==
The binary version of VirtualBox, pre-packaged for a wide variety of Linux Windows distributions , may be downloaded from the [http://www.virtualbox.org/wiki/Linux_Downloads VirtualBox web site]. Select the ''VirtualBox for Windows hosts'' package which that matches your Linux distribution (Fedora, Ubuntu, Red Hat, CentOS etc) and the target host 's hardware architecture (i386 x86 or AMD64) and download the archive to a suitable temporary location. If your Linux distribution is not listed download the appropriate archive for the ''All distributions'' option.
== Installing VirtualBox on Fedora, CentOS and Red Hat Enterprise Linux ==
Before launching VirtualBox, any user which require access must be added to the ''vboxusers'' group. This can be performed by using the graphical ''Users and Groups'' tool (accessed via the ''System->Administration->Users and Groups menu option). Once invoked, click ''Unlock'', enter your password and then click on the ''Manage Groups'' button. In the ''Manage Groups'' screen, select ''vboxusers'' from the list of groups, click on ''Properties'' and in the resulting dialog select the users which are to be added to the group.
Alternatively, users may be added to a group from the command line by issuing the following commandin a terminal window (Applications->Accessories->Terminal):
<pre>
== Installing VirtualBox using VirtualBox.run ==
For the installation To install VirtualBox on systems for which a package manager arachive is not available, a generic installer is provided in the form of the ''VirtualBox.run'' script. Note that although the script will be referred to as ''VirtualBox.run'' in this chapter, the actual name will include the architecture, version and build number of the downloaded release, for example, ''VirtualBox-2.1.4-43001-Linux_x86.run''. This installation archive script is downloaded by selecting the approrpriate appropriate download for ''All distributions'' on the VirtualBox download page. Once downloaded to a temporary directory, the installation is invoked by issuing the following command in a terminal window:
<pre>
sh ./VirtualBox-2.1.4-43001-Linux_x86.run install <installation path>
</pre>
 
where ''<installation path>'' represents the path to the directory where VirtualBox is to be installed. If no path is specified, the default path ''/opt/VirtualBox-<version>'' is used. The transcript from a successful installation is as follows:
 
<pre>
sh ./VirtualBox-2.1.4-43001-Linux_x86.run install
 
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation.......
VirtualBox Version 2.1.4 (2009-02-26T15:24:35Z) installer
Installing VirtualBox to /opt/VirtualBox-2.1.4
Building the VirtualBox kernel module
Building the VirtualBox netflt kernel module
 
VirtualBox has been installed successfully.
 
You will find useful information about using VirtualBox in the user manual
/opt/VirtualBox-2.1.4/UserManual.pdf
and in the user FAQ
http://www.virtualbox.org/wiki/User_FAQ
 
We hope that you enjoy using VirtualBox.
</pre>
 
The installation script will create the ''vboxusers'' group to which all VirtualBox users must be added. Users may be added the group using the following command either as root or using sudo:
 
<pre>
usermod -a -G vboxusers <username>
</pre>
 
where ''<username>'' represents the name of the user to be added to the ''vboxusers'' group.
 
== Removing VirtualBox using VirtualBox.run ==
 
A VirtualBox instance installed using the VirtualBox.run script may be removed at any time by issuing the following command as root user or using sudo:
 
<pre>
sh ./VirtualBox-2.1.4-43001-Linux_x86.run uninstall
</pre
1,798
edits

Navigation menu