VirtualBox安装增强功能(Linux)

我们在安装之前,必须得先安装好它所需要的依赖包,不然安装过程必定会出现错误!

一、安装依赖包

#yum install kernel-headers
#yum install kernel-devel
#yum install gcc* 
#yum install make

二、安装增强功能包

  1、安装命令

#mount /dev/cdrom /mnt/cdrom
#cd /mnt/cdrom #./VBoxLinuxAdditions.run

  这里安装的时候可能要等上一会,大家耐心点哦!安装完成后,一般都要重启

  2、 共享设置

    (1) 设备->分配数据空间

    (2) 挂载/卸载命令

#mkdir /mnt/share
#mount -t vboxsf myshare /mnt/share/

#umount -f /mnt/share

    (3)开机自动共享

#vim /etc/fstab
 
 添加一项
 
 myshare /mnt/share vboxsf rw,gid=100,uid=1000,auto 0 0

 

到这里就已经完整地安装和挂载好了共享!


CentOS6.3安装VBoxAdditions
 
CentOS6.3是安装在VirtualBox虚拟机上,安装好以后最好再将VBoxAdditions增强功能装上,
主要目的是能够在虚拟机和宿主机之间能够共享文件。
  www.2cto.com  
1. 更新内核。CentOS 6.3对应的kernel默认为2.6.32-279.el6.i686:
 
# uname -r
2.6.32-279.el6.i686
安装增强功能需要kernel-devel包,必须保证kernel-devel和kernel版本的一致。查看软件源中
kernel-devel的版本:
 
]# yum info kernel-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * extras: mirrors.163.com
 * updates: mirrors.163.com
Available Packages
Name        : kernel-devel
Arch        : i686
Version     : 2.6.32
Release     : 279.19.1.el6
Size        : 7.6 M
Repo        : updates
Summary     : Development package for building kernel modules to match the
            : kernel
URL         : http://www.kernel.org/
License     : GPLv2
Description : This package provides kernel headers and makefiles sufficient to
            : build modules against the kernel package.
 
当前的kernel-devel版本是2.6.32-279.19.1.e16。因此,必须升级kernel:
 
# yum update kernel
升级完后必须重启系统,新的kernel才能被使用。  www.2cto.com  
 
2. 安装kernel-devel和gcc。
 
# yum install kernel-devel gcc gcc-c++
 
3. 安装增强功能。进入增强功能光盘根目录,执行 Linux下的安装命令:
 
# ./VBoxLinuxAdditions.run 
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.4 Guest Additions for Linux..........
VirtualBox Guest Additions installer
Removing installed version 4.2.4 of VirtualBox Guest Additions...
Removing existing VirtualBox non-DKMS kernel modules[确定]
Building the VirtualBox Guest Additions kernel modules
Building the main Guest Additions module[确定]
Building the shared folder support module[确定]
Building the OpenGL support module[确定]
Doing non-kernel setup of the Guest Additions[确定]
Starting the VirtualBox Guest Additions [确定]
Installing the Window System drivers
Installing X.Org Server 1.10 modules[确定]
Setting up the Window System to use the Guest Additions[确定]
You may need to restart the hal service and the Window System (or just restart
the guest system) to enable the Guest Additions.
 
Installing graphics libraries and desktop services components[确定

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值