My centos version is: # cat/etc/issue: CentOSrelease6.2 (Final) 1. install the associated packageyuminstallkernel-headerskernel-develgccmake2. view the downloaded kernel code version ls/usr/src/kernels/
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 kernel code version.
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