VirtualBox 4.3.28 on Fedora 22/21, CentOS/RHEL 7.1/6.6/5.11

Oracle VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. VirtualBox is a general-purpose full virtualizer for x86 hardware. Targeted at server, desktop and embedded use, it is now the only professional-quality virtualization solution that is also Open Source Software.

VirtualBox supports a large number of guest operating systems:

Windows 3.x
    Windows NT 4.0
    Windows 2000
    Windows XP
    Windows Server 2003
    Windows Vista
    Windows 7
    Windows 8
    Windows 8.1
    DOS
    Linux (2.4, 2.6, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11)
    Solaris
    OpenSolaris
    OpenBSD

This guide shows howto install VirtualBox 4.3 (currently 4.3.28) on Fedora 22/21/20/19/18/17, CentOS 7.1/6.6/5.11, Red Hat (RHEL) 7.1/6.6/5.11. This guide uses Virtual Box own yum repositories.

Note: Fedora 16 users can install VirtualBox 4.2, Fedora 15/14 users can install VirtualBox 4.1, Fedora 13 users can install VirtualBox 4.0 and Fedora 12 users can install VirtualBox 3.2.
1. Change to root User

su -
## OR ##
sudo -i

2. Install Fedora or RHEL Repo Files

cd /etc/yum.repos.d/
## Fedora 22/21/20/19/18/17/16/15/14/13/12 users
wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
## CentOS 7.1/6.6/5.11 and Red Hat (RHEL) 7.1/6.6/5.11 users
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
cd /etc/yum.repos.d/
 ## Fedora 22/21/20/19/18/17/16/15/14/13/12 users
wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo
 ## CentOS 7.1/6.6/5.11 and Red Hat (RHEL) 7.1/6.6/5.11 users
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo

3. Update latest packages and check your kernel version

Update packages

yum update

Check that that you are running latest installed kernel version
Output of following commands version numbers should match

rpm -qa kernel |sort -V |tail -n 1
uname -r

Note: If you got kernel update or run older kernel than newest installed then reboot:

reboot

4. Install following dependency packages
CentOS 7/6/5 and Red Hat (RHEL) 7/6/5 needs EPEL repository, install it with following command:

## CentOS 7 and RHEL 7 ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
## CentOS 6 and RHEL 6 ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
## CentOS 5 and RHEL 5 ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
 
## CentOS 7 and RHEL 7 ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
## CentOS 6 and RHEL 6 ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
## CentOS 5 and RHEL 5 ##
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
## Fedora 22 ##
dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms
## Fedora 21/20/19/18/17/16/15/14 and CentOS/RHEL 7/6/5
yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms
## PAE kernel users install ##
## Fedora 22 ##
dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-PAE-devel dkms
## Fedora 21/20/19/18/17/16/15/14 and CentOS/RHEL 7/6/5 ##
yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-PAE-devel dkms
## Fedora 22 ##
dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms
## Fedora 21/20/19/18/17/16/15/14 and CentOS/RHEL 7/6/5
yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms
## PAE kernel users install ##
## Fedora 22 ##
dnf install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-PAE-devel dkms
## Fedora 21/20/19/18/17/16/15/14 and CentOS/RHEL 7/6/5 ##
yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-PAE-devel dkms

5. Install VirtualBox Latest Version 4.3 (currently 4.3.28)

## Fedora 22 ##
dnf install VirtualBox-4.3
## Fedora 21/20/19/18/17/16/15/14 and CentOS/RHEL 7/6/5 ##
yum install VirtualBox-4.3
## Fedora 22 ##
dnf install VirtualBox-4.3
## Fedora 21/20/19/18/17/16/15/14 and CentOS/RHEL 7/6/5 ##
yum install VirtualBox-4.3

Note:
This command create automatically vboxusers group and VirtualBox user must be member of that group.
This command also build needed kernel modules.

Rebuild kernel modules with following command:

/etc/init.d/vboxdrv setup
## OR ##
service vboxdrv setup
/etc/init.d/vboxdrv setup
## OR ##
service vboxdrv setup

6. Add VirtualBox User(s) to vboxusers Group

Replace user_name with your own user name or some another real user name.

usermod -a -G vboxusers user_name

7. Start VirtualBox
Use launcher from menu or simply run:

VirtualBox

Troubleshooting

If you have problems with KERN_DIR parameter or your kernel directory is not automatically detected then set KERN_DIR environment variable manually, using following method:

## Current running kernel on Fedora ##
KERN_DIR=/usr/src/kernels/`uname -r`
## Current running kernel on CentOS and Red Hat (RHEL) ##
KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m`
## Fedora example ##
KERN_DIR=/usr/src/kernels/2.6.33.5-124.fc13.i686
## CentOS and Red Hat (RHEL) example ##
KERN_DIR=/usr/src/kernels/2.6.18-194.11.1.el5-x86_64
## Export KERN_DIR ##
export KERN_DIR
 
## Current running kernel on Fedora ##
KERN_DIR=/usr/src/kernels/`uname -r`
 
## Current running kernel on CentOS and Red Hat (RHEL) ##
KERN_DIR=/usr/src/kernels/`uname -r`-`uname -m`
## Fedora example ##
KERN_DIR=/usr/src/kernels/2.6.33.5-124.fc13.i686
## CentOS and Red Hat (RHEL) example ##
KERN_DIR=/usr/src/kernels/2.6.18-194.11.1.el5-x86_64
## Export KERN_DIR ##
export KERN_DIR

Источник

Запись опубликована в рубрике *Unix,*Linux. Добавьте в закладки постоянную ссылку.

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *

Я не спамер This plugin created by Alexei91