centos6.4 64下安装vmware server 2.0.2

由于测试需要各种测试环境,所以就搭建一台vm server方便管理,esxi内存不够(至少2G,俺的只有1.9)。

按照官方的安装,出现各种问题。

最后这个问题,无解:

Building the vmmon module.
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmon-only'
make -C /lib/modules/2.6.20-15-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic'
  CC [M]  /tmp/vmware-config0/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config0/vmmon-only/linux/driver.c:80:
/tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: 错误: expected declaration specifiers or ‘...’ before ‘compat_exit’
/tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: 错误: expected declaration specifiers or ‘...’ before ‘exit_code’
/tmp/vmware-config0/vmmon-only/./include/compat_kernel.h:21: 警告: 在 ‘_syscall1’ 的声明中,类型默认为 ‘int’
make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] 错误 1
make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] 错误 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'
make: *** [vmmon.ko] 错误 2
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
Unable to build the vmmon module.
For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".
Execution aborted.

后来参考一个德国论坛的帖子,顺利就解决了。

http://www.gtkdb.de/index_7_1657.html

看不懂,可以用google翻译。

[root@centos6 ~]# yum install wget gcc kernel-devel make patch perl xinetd
[root@centos6 ~]# cd /usr/src
[root@centos6 src]# wget https://github.com/raducotescu/vmware-server-linux-2.6.3x-kernel/tarball/master -O vmware-server-linux-2.6.3x-kernel.tar.gz
[root@centos6 src]# tar xfvz vmware-server-linux-2.6.3x-kernel.tar.gz
[root@centos6 src]# cd raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce/
[root@centos6 raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce]# mv vmware-server-2.0.2-203138-update.patch vmware-server-2.0.2-203138-update.patch.backup
[root@centos6 raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce]# wget http://www.shadowcat.co.uk/blog/matt-s-trout/plat-forms-setup/-/vmware-server-2.0.2-linux-2.6.32.patch -O vmware-server-2.0.2-203138-update.patch

[root@centos6 raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce]# mv /root/VMware-server-2.0.2-203138.x86_64.tar.gz ./

[root@centos6 raducotescu-vmware-server-linux-2.6.3x-kernel-bb26dce]# ./vmware-server-2.0.x-kernel-2.6.3x-install.sh

基本上就可以解决了。