1. 程式人生 > >VMware Tool(相當於顯示卡驅動)的安裝:

VMware Tool(相當於顯示卡驅動)的安裝:

以vmware6.0為準,之前版本比如5.5無法安裝vmware tools

本文的linux為debian linux 也適用ubuntu linux,因為後者和前者是一個linux繼承者。

一般情況用root使用者登入就可以了,既然是虛擬機器也不用在意哪個使用者。沒有vm tools 需要 ctrl+alt 切換進vmware

(1)檢查有沒有安裝gcc
可以通過which gcc或者whereis gcc檢視。發現已安裝

注:debian 預設帶 gcc4.3 注意版本,有時需要用gcc4.1

(2)安裝核心標頭檔案
核心標頭檔案預設是會安裝到/usr/src目錄下。ls /usr/src檢視發現目錄為空,即沒有安裝。

適用 uname -a 查詢核心版本

debian:~# uname -a
Linux debian013 2.6.26-2-686 #1 SMP Wed Nov 4 20:45:37 UTC 2009 i686 GNU/Linux
debian:~# apt-cache search linux header 2.6.26-2-686
linux-headers-2.6.26-2-686 - Header files for Linux 2.6.26-2-686

3)vmware tools 在vm安裝目錄下 linux.iso檔案,把檔案釋放到資料夾裡。

vmware-install.pl是安裝檔案,到目錄下直接執行就可以(不是雙擊)

debian:/tmp/vmware-tools-distrib# ./vmware-install.pl
A previous installation of VMware Tools has been detected.

The previous installation was made by the tar installer (version 4).

Keeping the tar4 installer database format.

Uninstalling the tar installation of VMware Tools.

Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: done

The removal of VMware Tools 6.0.0 build-45731 for Linux completed successfully.
Thank you for having tried this software.

Installing VMware Tools. This may take from several minutes to over an hour
depending upon its size.

In which directory do you want to install the binary files?
[/usr/bin]

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]

What is the directory that contains the init scripts?
[/etc/init.d]

In which directory do you want to install the daemon files?
[/usr/sbin]

In which directory do you want to install the library files?
[/usr/lib/vmware-tools]

The path "/usr/lib/vmware-tools" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]

In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]

The path "/usr/share/doc/vmware-tools" does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes]

The installation of VMware Tools 6.0.0 build-45731 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".

Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes] no

Enjoy,

--the VMware team

debian:/tmp/vmware-tools-distrib# /usr/bin/vmware-config-tools.pl

Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: done
Trying to find a suitable vmmemctl module for your running kernel.

None of the pre-built vmmemctl modules for VMware Tools is suitable for your
running kernel. Do you want this program to try to build the vmmemctl module
for your system (you need to have a C compiler installed on your system)?
[yes]

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include]

The path "/usr/src/linux/include" is not an existing directory.

What is the location of the directory of C header files that match your running


kernel? [/usr/src/linux/include] /usr/src/linux-headers-2.6.17-2-686/include 【注意這裡!】

Extracting the sources of the vmmemctl module.

Building the vmmemctl module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmemctl-only'
make -C /usr/src/linux-headers-2.6.17-2-686/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.17-2-686'
CC [M] /tmp/vmware-config0/vmmemctl-only/os.o
SHIPPED /tmp/vmware-config0/vmmemctl-only/vmmemctl1.o
LD [M] /tmp/vmware-config0/vmmemctl-only/vmmemctl.o
Building modules, stage 2.
MODPOST
CC /tmp/vmware-config0/vmmemctl-only/vmmemctl.mod.o
LD [M] /tmp/vmware-config0/vmmemctl-only/vmmemctl.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.17-2-686'
cp -f vmmemctl.ko ./../vmmemctl.o
make: Leaving directory `/tmp/vmware-config0/vmmemctl-only'
The module loads perfectly in the running kernel.

Extracting the sources of the vmhgfs module.

Building the vmhgfs module.