此文版权属于作者 所有,任何人、媒体或者网站转载、借用都必须征得作者本人同意
为 VMware 里的 debian 安装 VMware tools 相当麻烦,下面是安装笔记:
1、===============================
配置编译环境
apt-get install gcc make
apt-get install linux-headers-xxxxx # xxxxx 通过 uname -a 获得
sudo apt-get install build-essential libgtk2.0-dev
sudo apt-get install libproc-dev libdumbnet-dev xorg-dev
2、===============================
下载 open vm tools
到 sourceforge.net 下载 open-vm-tools
解压后执行 ./configure
成功后修改 modules/linux 下个子 Makefile 文件
修改
$(DRIVER_KO): prebuild
为
$(DRIVER_KO):
xxx_prebuild:
3、===============================
VMwareTools 安装
VMwareTools 解压,
执行 vmware-tools-distrib/vmware-install.pl 进行安装
进行到 询问执行 vmware-config-tools.pl 时,
在 open-vm-tools 目录执行如下脚本:
#!/bin/sh
tar -xzf open-vm-tools-*.gz
cd open-vm-tools-*/modules/linux
modsrc="/usr/lib/vmware-tools/modules/source"
for x in `ls -d v*`
do
mv $x ${x}-only
tar -cf $x.tar ${x}-only
mv ${x}-only $x
mv $modsrc/$x.tar $modsrc/$x.tar.orig
mv $x.tar $modsrc
done
echo "Fixing vmum-ga"
cd /usr/share/vmum-ga
if [! -e libexpat.so.0]
then
ln -s libexpat.so libexpat.so.0
service vmum-ga restart
chkconfig vmum-ga on
fi
然后继续执行 vmware tools 的安装就可以了
4、===============================
鼠标驱动配置
安装完 vmware tools 后如果鼠标不可控:
信vmware-tools安装完成,修改/etc/X11/xorg.conf :
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ps/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection
添加一项:
Section "InputDevice"
Identifier "XOrgMouseWorkaround"
Driver "void"
EndSection
并把这一项加入 ServerLayout section:
InputDevice "XOrgMouseWorkaround"
保存,重启!
5、===============================
网络驱动配置
use the vmxnet driver:
/etc/init.d/networking stop
rmmod pcnet32
rmmod vmxnet
modprobe vmxnet
/etc/init.d/networking start
6、===============================
vmware tools 安装搞定