| 论坛注册| 加入收藏 | 设为首页| RSS
Google
您当前的位置:首页 > Linux频道 > Linux入门与提高 > 安装与配置

Fedora Core 6系统安装VMware-tool

时间:2007-04-19 11:51:51  来源:Linux联盟收集整理  作者:

在fc6上安装vmware-tool。大概步骤分10步: i68Linux联盟

1.安装c编译器 i68Linux联盟

2.安装kernel-devel i68Linux联盟

3.检查kernel跟kernel-devel的版本号 i68Linux联盟

4.两个版本号不一致,进行升级 i68Linux联盟

5.再次检查版本号,还不一致,需要重启。 i68Linux联盟

6.重启后,版本号一致。 i68Linux联盟

7.用ls命令查看匹配kernel的c编译器的header的路径 i68Linux联盟

8.安装vmware-tool i68Linux联盟

9.选择屏幕分辨率。 i68Linux联盟

10.还要修改xorg config设置 i68Linux联盟

详细请看下面:: i68Linux联盟

1.安装c编译器 i68Linux联盟

[root@localhost ~]# yum install gcc i68Linux联盟

2.安装kernel-devel i68Linux联盟

[root@localhost ~]# yum install kernel-devel i68Linux联盟

3.检查kernel跟kernel-devel的版本号 i68Linux联盟

[root@localhost ~]# uname -r i68Linux联盟

2.6.18-1.2798.fc6 i68Linux联盟

[root@localhost ~]# rpm -q kernel-devel i68Linux联盟

kernel-devel-2.6.18-1.2849.fc6 i68Linux联盟

4.两个版本号不一致,进行升级 i68Linux联盟

[root@localhost ~]# yum -y upgrade kernel kernel-devel i68Linux联盟

5.再次检查版本号,还不一致,需要重启。 i68Linux联盟

[root@localhost ~]# uname -r i68Linux联盟

2.6.18-1.2798.fc6 i68Linux联盟

[root@localhost ~]# rpm -q kernel-devel i68Linux联盟

kernel-devel-2.6.18-1.2849.fc6 i68Linux联盟

[root@localhost ~]# reboot i68Linux联盟

6.重启后,版本号一致。 i68Linux联盟

[root@localhost ~]# uname -r i68Linux联盟

2.6.18-1.2849.fc6 i68Linux联盟

[root@localhost ~]# rpm -q kernel-devel i68Linux联盟

kernel-devel-2.6.18-1.2849.fc6 i68Linux联盟

7.用ls命令查看匹配kernel的c编译器的header的路径 i68Linux联盟

[root@localhost ~]# ls -d /usr/src/kernels/$(uname -r)*/include i68Linux联盟

/usr/src/kernels/2.6.18-1.2849.fc6-i686/include(记住该路径,安装vmware-tool时需要用到) i68Linux联盟

8.安装vmware-tool。先释放鼠标,在vmware中选择安装vmware-tool,进入fc6,打开光驱,拷贝VMware- workstation-5.5.2-29772.tar.gz,将其解压到任何位置。解压后,双击vmware-install.pl,选择在终端运行,然后一直按默认设置,一路按回车键。 i68Linux联盟

9.直到该步骤,拷贝粘贴第7步的路径,然后一直按回车,直到选择屏幕分辨率。 i68Linux联盟

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

kernel? [/usr/src/kernels/2.6.18-1.2849.fc6-i686/include] i68Linux联盟

提示信息显示hgfs模块安装有问题,没关系,下一篇文章中解决。 i68Linux联盟

10.到了该步骤,问你是否改变X-window的设置,选y,就可以改变分辨率。 i68Linux联盟

Do you want to change your guest X resolution? (yes/no) [no] y i68Linux联盟

Please choose one of the following display sizes (1 - 13): i68Linux联盟

[1] "640x480" i68Linux联盟

[2]< "800x600" i68Linux联盟

[3] "1024x768" i68Linux联盟

[4] "1152x864" i68Linux联盟

[5] "1280x800" i68Linux联盟

[6] "1152x900" i68Linux联盟

[7] "1280x1024" i68Linux联盟

[8] "1376x1032" i68Linux联盟

[9] "1400x1050" i68Linux联盟

[10] "1680x1050" i68Linux联盟

[11] "1600x1200" i68Linux联盟

[12] "1920x1200" i68Linux联盟

[13] "2364x1773" i68Linux联盟

Please enter a number between 1 and 13: i68Linux联盟

[3] i68Linux联盟

还不行呢,再跟着下边的走吧! i68Linux联盟

I keep several Linux distributions running on VMware Workstation due to my work. Unfortunately, due to recent changes in the Linux kernel, you cannot properly compile the vmhgfs driver on Fedora Core 6. Fortunately, I have a workaround until VMware releases a proper fix. i68Linux联盟

First, go to /usr/lib/vmware-tools/modules/source and unpack vmhgfs.tar like this: i68Linux联盟

******************ggggggggggg************************ i68Linux联盟

tar -xf vmhgfs.tar i68Linux联盟

******************************************************** i68Linux联盟

Now you should have a new directory called vmhgfs-only. You need to get the following patch to make it work: i68Linux联盟

vmhgfs-i_node-fix.patch(http://home.sztoltzteixeira.com/vmhgfs-i_node-fix.patch) i68Linux联盟

To apply it, simply run: i68Linux联盟

patch -p1 < /wherever/you/saved/it/vmhgfs-i_node-fix.patch i68Linux联盟

This will patch vmhgfs-only/driver.c to conform with the kernel changes. Now you will have to repack it and reconfigure the VMware Tools. Simply run the following two commands: i68Linux联盟

tar -cf vmhgfs.tar vmhgfs-only i68Linux联盟

************************ggggggggggggggg******************* i68Linux联盟

run the command: i68Linux联盟

/usr/bin/vmware-config-tools.pl i68Linux联盟

********************************************************** i68Linux联盟

If all you want is to get the module compiled, you're all set. If you actually need to access a shared folder, then you should know that this workaround will not work while SELinux is enabled. If you want to use the files, you will have to disable SELinux by going to System -> Administration -> Security Level and Firewall. You will have to reboot, but after that, everything should work fine. i68Linux联盟

One more thing. If your host is Windows, you may notice that the files on the shared folders will appear as only accessible by root (they are in fact fully modifiable by everyone, but GNOME won't see it and this can be an annoyance.) If you want, the patch below will make all files appear with proper permissions (all permissions for everyone.) Apply it using the same steps used for the patch above. i68Linux联盟

vmhgfs-perm-fix.patch (http://home.sztoltzteixeira.com/vmhgfs-perm-fix.patch) i68Linux联盟

Now,all the ok. i68Linux联盟

下面是两个patch文件的内容: i68Linux联盟

1 i68Linux联盟

diff -Naur vmhgfs-only/driver.c vmhgfs-only-new/driver.c i68Linux联盟

--- vmhgfs-only/driver.c 2006-08-04 14:25:52.000000000 -0300 i68Linux联盟

+++ vmhgfs-only-new/driver.c 2006-10-28 15:26:14.000000000 -0300 i68Linux联盟

@@ -41,8 +41,8 @@ i68Linux联盟

#define HGFS_SB_TO_COMMON(sb) ((HgfsSuperInfo *)(sb)->s_fs_info) i68Linux联盟

#endif i68Linux联盟

-#define INODE_SET_II_P(inode, info) do { (inode)->u.generic_ip = (info); } while (0) i68Linux联盟

-#define INODE_GET_II_P(inode) ((HgfsInodeInfo *)(inode)->u.generic_ip) i68Linux联盟

+#define INODE_SET_II_P(inode, info) do { (inode)->i_private = (info); } while (0) i68Linux联盟

+#define INODE_GET_II_P(inode) ((HgfsInodeInfo *)(inode)->i_private) i68Linux联盟

/* i68Linux联盟

* 2.5.x kernels support nanoseconds timestamps. i68Linux联盟

@@ -760,7 +760,6 @@ i68Linux联盟

inode->i_uid = 0; /* This is bogus, should be the mount owner. */ i68Linux联盟

inode->i_gid = 0; /* This is bogus, should be the mount owner. */ i68Linux联盟

inode->i_rdev = 0; /* Device nodes are not supported */ i68Linux联盟

- inode->i_blksize = HGFS_BLOCKSIZE; i68Linux联盟

inode->i_blocks = (attr->size + HGFS_BLOCKSIZE - 1) / HGFS_BLOCKSIZE; i68Linux联盟

inode->i_size = attr->size; i68Linux联盟

HGFS_SET_TIME(inode->i_atime, attr->accessTime); i68Linux联盟

2 i68Linux联盟

--- vmhgfs-only/driver.c 2006-10-28 15:26:14.000000000 -0300 i68Linux联盟

+++ vmhgfs-only/driver.c-new 2006-10-28 15:34:07.000000000 -0300 i68Linux联盟

@@ -755,7 +755,7 @@ i68Linux联盟

/* Set the access mode. */ i68Linux联盟

inode->i_mode &= ~S_IRWXUGO; i68Linux联盟

- inode->i_mode |= (attr->permissions << 6); /* Only applies to owner. */ i68Linux联盟

+ inode->i_mode |= attr->permissions * 0111; /* Only applies to owner. */ i68Linux联盟

inode->i_nlink = 1; /* Bogus? */ i68Linux联盟

inode->i_uid = 0; /* This is bogus, should be the mount owner. */ i68Linux联盟

inode->i_gid = 0; /* This is bogus, should be the mount owner. */ i68Linux联盟

最后修改xorg config设置,不然重启后会报X-WINDOWS出错。 i68Linux联盟

进入/etc/X11/,用文本打开xorg.conf,加上以下几段: i68Linux联盟

1、Section "Monitor" i68Linux联盟

Identifier "vmware" i68Linux联盟

EndSection i68Linux联盟

Section "InputDevice" i68Linux联盟

Identifier "Mouse0" i68Linux联盟

Driver "vmmouse" i68Linux联盟

Option "Protocol" "Auto" i68Linux联盟

Option "Device" "/dev/input/mouse0" i68Linux联盟

EndSection i68Linux联盟

2、Section "Monitor" i68Linux联盟

Identifier "Monitor0" i68Linux联盟

ModelName "LCD Panel 1280x1024" i68Linux联盟

HorizSync 31.5 - 67.0 i68Linux联盟

VertRefresh 50.0 - 75.0 i68Linux联盟

Option "dpms" i68Linux联盟

EndSection i68Linux联盟

然后找到 含有"ServerLayout" 的section, 在Section跟EndSection之间加上以下一行。 i68Linux联盟

InputDevice "Mouse0" "CorePointer" i68Linux联盟

上面的配置不一定行的,只是个参考。 i68Linux联盟

这个是我的x11的配置文件: i68Linux联盟

# Xorg configuration created by system-config-display i68Linux联盟

Section "ServerLayout" i68Linux联盟

Identifier "single head configuration" i68Linux联盟

Screen 0 "Screen0" 0 0 i68Linux联盟

InputDevice "Mouse0" "CorePointer" i68Linux联盟

InputDevice "Keyboard0" "CoreKeyboard" i68Linux联盟

EndSection i68Linux联盟

Section "InputDevice" i68Linux联盟

Identifier "Keyboard0" i68Linux联盟

Driver "kbd" i68Linux联盟

Option "XkbModel" "pc105" i68Linux联盟

Option "XkbLayout" "us" i68Linux联盟

EndSection i68Linux联盟

Section "InputDevice" i68Linux联盟

Identifier "Mouse0" i68Linux联盟

Driver "vmmouse" i68Linux联盟

Option "Protocol" "Auto" i68Linux联盟

Option "Device" "/dev/input/mouse0" i68Linux联盟

EndSection i68Linux联盟

Section "Monitor" i68Linux联盟

### Comment all HorizSync and VertSync values to use DDC: i68Linux联盟

### Comment all HorizSync and VertSync values to use DDC: i68Linux联盟

Identifier "vmware" i68Linux联盟

ModelName "LCD Panel 1280*1024" i68Linux联盟

### Comment all HorizSync and VertSync values to use DDC: i68Linux联盟

HorizSync 31.5 - 67.0 i68Linux联盟

VertRefresh 50.0 - 75.0 i68Linux联盟

Option "dpms" i68Linux联盟

EndSection i68Linux联盟

Section "Device" i68Linux联盟

Identifier "VMware SVGA" i68Linux联盟

Driver "vmware" i68Linux联盟

EndSection i68Linux联盟

Section "Screen" i68Linux联盟

# Don't specify DefaultColorDepth unless you know what you're i68Linux联盟

# doing. It will override the driver's preferences which can i68Linux联盟

# cause the X server not to run if the host doesn't support the i68Linux联盟

# depth. i68Linux联盟

Identifier "Screen0" i68Linux联盟

Device "VMware SVGA" i68Linux联盟

Monitor "vmware" i68Linux联盟

DefaultDepth 24 i68Linux联盟

SubSection "Display" i68Linux联盟

# VGA mode: better left untouched i68Linux联盟

Viewport 0 0 i68Linux联盟

Depth 4 i68Linux联盟

Modes "640x480" i68Linux联盟

EndSubSection i68Linux联盟

SubSection "Display" i68Linux联盟

Viewport 0 0 i68Linux联盟

Depth 8 i68Linux联盟

Modes "1024x768" i68Linux联盟

EndSubSection i68Linux联盟

SubSection "Display" i68Linux联盟

Viewport 0 0 i68Linux联盟

Depth 15 i68Linux联盟

Modes "1024x768" i68Linux联盟

EndSubSection i68Linux联盟

SubSection "Display" i68Linux联盟

Viewport 0 0 i68Linux联盟

Depth 16 i68Linux联盟

Modes "1024x768" i68Linux联盟

EndSubSection i68Linux联盟

SubSection "Display" i68Linux联盟

Viewport 0 0 i68Linux联盟

Depth 24 i68Linux联盟

Modes "1024x768" "800x600" "640x480" i68Linux联盟

EndSubSection i68Linux联盟

EndSection i68Linux联盟

来顶一下
近回首页
返回首页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
相关文章
栏目更新
栏目热门