快捷搜索:

在Debain和FC5里安装VMware

这个礼拜忙着在linux里装虚拟机,现在总算告一段了,Debian里的VMware也装成了,FC5里VMware的XP也装成了,不管是google、在论坛里发帖子求救,照样请同砚协助,总之算是完成了。记录一下这些历程,作为自己进修萍踪的记录。

这个礼拜忙着在linux里装虚拟机,现在总算告一段了,Debian里的VMware也装成了,FC5里VMware的XP也装成了,不管是google、在论坛里发帖子求救,照样请同砚协助,总之算是完成了。记录一下这些历程,作为自己进修萍踪的记录。

VMware-workstation-5.5.1-19175的下载地址

http://www.skycn.com/soft/22092.html

vmware-any-any-update**.tar.gz下载地址

http://mirror.vmmatrix.net/vmware-any-any-update/

首先说一下在Debian里安装和设置设置设备摆设摆设VMware的历程。

安装之前要先安装对应你的内核版本的linux-header内核头文件,可用aptitude search linux-header v |more来查看与你对应的可以安装的内核头文件,如我的

v kernel-headers-2.4 -

p kernel-headers-2.4-386 - Linux kernel headers for version 2.4 on 38

p kernel-headers-2.4-586tsc - Linux kernel headers for version 2.4 on Pe

p kernel-headers-2.4-686 - Linux kernel headers for version 2.4 on PP

p kernel-headers-2.4-686-smp - Linux kernel headers for version 2.4 on PP

p kernel-headers-2.4-k6 - Linux kernel headers for version 2.4 on K

p kernel-headers-2.4-k7 - Linux kernel headers for version 2.4 on AM

p kernel-headers-2.4-k7-smp - Linux kernel headers for version 2.4 on AM

p kernel-headers-2.4.27-2 - Header files related to Linux kernel versi

p kernel-headers-2.4.27-2-386 - Linux 2.4.27 kernel headers for 386

p kernel-headers-2.4.27-2-586tsc - Linux 2.4.27 kernel headers for Pentium-Cl

p kernel-headers-2.4.27-2-686 - Linux 2.4.27 kernel headers for PPro/Celer

p kernel-headers-2.4.27-2-686-smp - Linux 2.4.27 kernel headers for PPro/Celer

p kernel-headers-2.4.27-2-k6 - Linux 2.4.27 kernel headers for AMD K6/K6-

p kernel-headers-2.4.27-2-k7 - Linux 2.4.27 kernel headers for AMD K7

p kernel-headers-2.4.27-2-k7-smp - Linux 2.4.27 kernel headers for AMD K7 SMP

p kernel-headers-2.4.27-speakup - Header files related to Linux kernel versi

之后用aptitude install安装这些包即可.

因为我的内核版本对照低,以是在编译历程中很顺利,然则似乎在2.6.16的内核中编译起来就很麻烦,可能要用VMware的补丁.

安装历程将VMware-workstation-5.5.1-19175.tar.gz放在/tmp下

cd /tmp

tar -xvf VMware-workstation-5.5.1-19175.tar.gz

cd vmware-distrib

./vmware-install.pl

顺利时,直接即可安装成功.

FC5的内查对照高,结果就很麻烦,必要打内核补丁,说实话我的安装对照崩溃.

先是进级内核

yum install kernel-smp-devel-2.6.16-1.2080_FC5

yum -y install gcc gcc-c++ kernel-devel

yum update kernel

进级后用rpm -qa | grep kernel查了一下,内核为

kernel-2.6.15-1.2054_FC5

kernel-smp-devel-2.6.16-1.2080_FC5

kernel-2.6.16-1.2080_FC5

kernel-devel-2.6.16-1.2080_FC5

然后仍有

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

kernel? [/usr/src/linux/include]The directory of kernel headers (version 2.6.16-1.2080_FC5smp) does not match

your running kernel (version 2.6.15-1.2054_FC5). Even if the module were to

compile successfully, it would not load into the running kernel.

的问题,rpm -e kernel-2.6.15-1.2054_FC5删了kernel-2.6.15-1.2054_FC5,重启了一下,呵呵内核真的升到kernel-2.6.16-1.2080_FC5了.

改动vmware-distrib的vmware-config.pl中的1972和1973两行

$header_page_offset =~ s/^$pattern (?0x([0-9a-fA-F]{8,}).*$/$1/;

if ($header_page_offset =~ /[0-9a-fA-F]{8,}/) {

if ($header_page_offset =~ /^$pattern (?0x([0-9a-fA-F]{8,})/) {

$header_page_offset = $1;

即可。

现在运行./vmware-config.pl照样不可,说是

....

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/kernels/2.6.15-1.2054_FC5-i686'

make: 奸淫 [vmmon.ko] 差错 2

make: Leaving directory `/tmp/vmware-config0/vmmon-only'

Unable to build the vmmon module.

...

接着下载VMware文件的补丁vmware-any-any-update**.tar.gz,进入解压文件夹,运行./runme.pl

运行没有问题.

以为总算完成了,谁知道运行vmware照样不可,请同砚协助,在网上哪搜到一篇说是SELinux防火墙的问题,关了防火墙,

vim /etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

# enforcing - SELinux security policy is enforced.

# permissive - SELinux prints warnings instead of enforcing.

# disabled - SELinux is fully disabled.

SELINUX=disabled //Disabled关掉落防火墙

# SELINUXTYPE= type of policy in use. Possible values are:

# targeted - Only targeted network daemons are protected.

# strict - Full SELinux protection.

SELINUXTYPE=targeted

保存推出.

重启此次才是真的可以了

您可能还会对下面的文章感兴趣: