CentOS6.3安装VBoxAdditions

CentOS6.3是安装在VirtualBox虚拟机上,安装好以后最好再将VBoxAdditions增强功能装上,主要目的是能够在虚拟机和宿主机之间能够共享文件。


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才能被使用。

 

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[确定]
复制代码

你可能感兴趣的:(Linux)