According to the company's needs, to install VirtualBox to build the server. This version of my installation is available in version 4.1.
Why is it? My side of the server, tried the 4.2/3, 5.0 version, the installation is successful, after all is not normal use. Final Experiment 4.1 version succeeded!
1. Change to root User
Su-## OR # #sudo-I
2. Install Fedora or RHEL Repo Files
cd/etc/yum.repos.d/
# # 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
3. Update Latest packages and check your kernel version
Update Packages
Yum Update
Check that this is running latest installed kernel version
Output of following commands version numbers should match:
Rpm-qa kernel |sort |tail-n 1
Uname-r
The version of kernel under two commands should be consistent
Note: If you got kernel update or run older kernel than NEWest installed then reboot:
Reboot
4. Install following dependency packages
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
5. Install VirtualBox Latest Version 4.1 (currently 4.1.8)
Yum Install VirtualBox-4.1
Note:
This command create automatically vboxusers group and VirtualBox user must is 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
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 had problems with Kern_dir parameter or your kernel directory was not automatically detected then set Kern_dir ENVI Ronment 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// environment variable configuration should be configured according to the actual situation
# # Export Kern_dir
# #Export Kern_dir
1. The installation of the discovery did not appear graphical interface, because the VirtualBox default installation memory size is 512M, and CentOS silent request is 528M, so the installation of the time to increase memory.
Some explanations for the CentOS website
Https://wiki.centos.org/HowTos/I_need_the_Kernel_Source
https://ask.fedoraproject.org/en/question/40926/trying-to-install-virtualbox-or-vmware-fedora-20/
CentOS 6.5 VirtualBox installation and frequently asked questions