Before we install, we have to install the dependent packages it needs first, or the installation process is bound to cause errors.
First, install the dependency packAttention! To view installed kernel related packages: Rpm-qa | grep kernel, according to the corresponding version in http://rpm.pbone.net/download the corresponding kernel-headers and Kernel-devel, For example, my kernel version is: kernel-2.6.32-71.el6.x86_64, then the corresponding download: kernel-headers-2.6.32-71.el6.x86_ 64 with Kernel-devel-2.6.32-71.el6.x86_64, if the downloaded installation package is in RPM format, install with sudo rpm-ivh command
If you have already installed the do not want to go to Kernel-header and Kernel-devel, first delete, CentOS system Delete command: sudo yum remove
Then use the following two commands to download GCC, make-related tools
#yum install gcc*
#yum install make
Second, install the Enhanced Feature Pack
1. Installation command
#mount/dev/cdrom/mnt/cdrom
#cd/mnt/cdrom
#./vboxlinuxadditions.run
It may take a while to install here, we have to be patient! After the installation is complete, it is generally restarted, and there may be an OpenGL hint error when complete, but it does not affect the use
2, sharing settings
(1) Device-> shared folder (here shared folder for host Win7 G:\sharing), note! A host's folder cannot be a shared folder for multiple virtual machines at the same time
(2) Mount/uninstall command
#mkdir/mnt/share
#mount-t vboxsf sharing/mnt/share/
#umount-F/mnt/share
(3) Automatic sharing
#vim/etc/fstab