entos6.6安装Virtualbox

前端之家收集整理的这篇文章主要介绍了entos6.6安装Virtualbox前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

一,环境信息
硬件:虚拟机
操作系统:Centos 6.6 64位
安装用户:root

二,安装步骤
启动VNCServer,用vncviewer连接VNCServer。
1,安装关联的package

#yuminstallkernelkernel-headerskernel-develgccmake1

2,查看下载的内核代码版本

#ls/usr/src/kernels/2.6.32-504.12.2.el6.x86_6412

查看本机的内核版本

#uname-r2.6.32-504.el6.x86_6412

上面2个版本一定要一致,不然会有问题。内核升级后reboot,后执行如下命令:

#uname-r2.6.32-504.12.2.el6.x86_6412

这时,2个版本一致了。
3,开始安装VirtualBox

#cd/etc/yum.repos.d/#wgethttp://download.virtualBox.org/virtualBox/rpm/rhel/virtualBox.repo#yuminstallVirtualBox-4.3123

4,将用户分配到vb组中

#/usr/sbin/usermod-a-GvBoxusersroot1

5,执行# /etc/init.d/vBoxdrv setup
Stopping VirtualBox kernel modules [确定]
Recompiling VirtualBox kernel modules [确定]
Starting VirtualBox kernel modules [确定]

6,启动VirtualBox

#virtualBox1

这里写<a href=图片描述" title="" src="http://img.blog.csdn.net/20150326163604243">

7,安装VirtualBox_Extension_Pack。
http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html 下载对应VirtualBox版本的Extension Pack。这里下载:Oracle_VM_VirtualBox_Extension_Pack-4.3.26-98988.vBox-extpack。
1,进入管理菜单,选择“全局设定”子菜单

这里写<a href=图片描述" title="" src="http://img.blog.csdn.net/20150330170233670">


2,选择“扩展”

这里写<a href=图片描述" title="" src="http://img.blog.csdn.net/20150330170245889">


3,选择“Oracle_VM_VirtualBox_Extension_Pack-4.3.26-98988.vBox-extpack”文件

这里写<a href=图片描述" title="" src="http://img.blog.csdn.net/20150330170333235">


4,点击“安装”。

这里写<a href=图片描述" title="" src="http://img.blog.csdn.net/20150330170411018">


这里写<a href=图片描述" title="" src="http://img.blog.csdn.net/20150330170437086">


5,安装成功。

这里写<a href=图片描述" title="" src="http://img.blog.csdn.net/20150330170542134">


这里写<a href=图片描述" title="" src="http://img.blog.csdn.net/20150330170550870">

三,常见错误
1,下载VirtualBox-4.3-4.3.26_98988_el6-1.x86_64.rpm安装,报如下错:
Makefile:183: * Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again\u3002 \u505c\u6b62\u3002
原因:没有内核原文件
解决方法
先安装gcc kernel kernel-devel等程序

#yuminstallgcc从软件仓库下载gcc,然后安装,这个是编译器#yuminstallmake安装make,这个是自动编译源码的工具,写好makefile就可以方便编译#yuminstallkernel-headers安装内核,编译内核,驱动必要的#yuminstallkernel-devel同上#yuminstallkernel12345

2,启动virtualBox时,报如下错:

#virtualBoxWARNING:ThevBoxdrvkernelmoduleisnotloaded.Eitherthereisnomodule
availableforthecurrentkernel(2.6.32-504.12.2.el6.x86_64)oritFailedto
load.Pleaserecompilethekernelmoduleandinstallitby

sudo/etc/init.d/vBoxdrvsetup

YouwillnotbeabletostartVMsuntilthisproblemisfixed.12345678

解决方法:执行#/etc/init.d/vBoxdrv setup


转自:http://blog.csdn.net/freedomboy319/article/details/44650175

原文链接:https://www.f2er.com/centos/375583.html

猜你在找的CentOS相关文章