1.下载virtualbox的源:

 

 ## 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

2.更新到最新系统:

yum update

3.检查内核是否为最新:

 

rpm -qa kernel |sort |tail -n 1 

uname -r

4.安装依赖包源:

 

##CentOS 5 and Red Hat (RHEL) 5 needs EPEL repository, install it with following command:

rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

## PAE kernel users install ##

yum install binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-PAE-devel dkms

 

6.查看VirutalBox版本
rpm list *VirualBox*
 
7.安装:
yum install VirtualBox-4.2.i686
/etc/init.d/vboxdrv setup

1.This command create automatically vboxusers group and VirtualBox user must be member of that group.

2.This command also build needed kernel modules.

 
8.添加使用虚拟机用户:
 
usermod -a -G vboxusers user_name
 

文章出自

http://www.if-not-true-then-false.com/2010/install-virtualbox-with-yum-on-fedora-centos-red-hat-rhel/