My centos version is:
# Cat/etc/issue:
Centos Release 6.2 (final)
1. Install the associated package
Yum install kernel-headers kernel-devel GCC make
2. view the downloaded KernelCodeVersion
Ls/usr/src/kernels/
2.6.32-279.14.1.el6.i686
3. view the kernel version of the local machine.
Uname-R
2.6.32-220.2.1.el6.i686
4. The above two versions must be consistent, otherwise there will be problems. Yum install kernel-headers should install the latest version. Use the following command to upgrade the kernel of the local machine to the latest version:
Yum upgrade Kernel
After the kernel is upgraded, reboot and view the Local Kernel again:
Uname-R
2.6.32-279.14.1.el6.i686
5. Start to install VB
[Root @ Linux] # cd/etc/yum. Repos. d/
[Root @ Linux] # wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
[Root @ Linux] # Yum install VirtualBox-4.2
6. Assign the user to the VB Group
/Usr/sbin/usermod-a-g vboxusers Root
7. Start virtualbox
[Root @ Linux] # virtualbox