CentOS 下的VirtualBox 安装步骤

1. 下载VirtualBox

 

wget http://download.virtualbox.org/virtualbox/3.0.8/VirtualBox-3.0.8_53138_rhel5-1.x86_64.rpm

 

如果下载后的不是rpm,而是有后缀,可以用mv 改名

 

mv  VirtualBox-3.0.8_53138_rhel5-1.x86_64.rpm.xxxxx  VirtualBox-3.0.8_53138_rhel5-1.x86_64.rpm

 

安装RPM

 

rpm -ivh VirtualBox-3.0.8_53138_rhel5-1.x86_64.rpm

 

2. 创建一个vboxuser 组,并把想使用的用户添加到这个组

 

groupadd vboxuser

 

usermod -G vboxuser maoxiang

 

 

3. 初始化vbox

 

/etc/init.d/vboxsrv setup

 

如果启动失败,用 dmesg 查看日志,可以看到最后几行信息

vboxdrv: NMI watchdog active -- refused to load the kernel module! Please disable

如果是 这种情况,编译 启动参数

在 /boot/grbu/grub.conf 中增加 nmi_watchdog 参数

 

 kernel /boot/vmlinuz-2.6.18-164.el5 nmi_watchdog=0 ro root=LABEL=/ rhgb quiet

 

重新启动计算机,即可。

 

 

如果还启动失败 ,有日志在 /var/log/vbox-install.log

Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again. Stop.

 

说明kernel 的相关包没有安装。

 

yum info  kernel*

 

一般来说安装以下几个即可

 

yum install kernel-debug

yum install kernel-devel

 

如果yum 安装太慢,可以使用国内镜像

cd /etc/yum.d.repo

wget http://centos.ustc.edu.cn/CentOS-Base.repo

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值