VMware中FC6成功安装VMware tool全过程

来源:岁月联盟 编辑:zhuzhu 时间:2007-10-26
VMware中FC6成功安装VMware tool全过程内容简介:1.安装C编译器 2.安装kernel-devel 3.检查kernel跟kernel-devel的版本号 4.两个版本号不一致,进行升级 5.再次检查版本号,还不一致,需要重启。 6.重启后,版本号一致。 7.用ls命令查看匹配kernel的c编译器的

1.安装C编译器

2.安装kernel-devel

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

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

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

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

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

8.安装vmware-tool

9.选择屏幕分辨率。

10.还要修改xorg config设置

详细请看下面::

本教程绝对原创,转载请注明出处,谢谢,祝大家好运。

1.安装c编译器

[root@localhost ~]# yum install gcc

Loading "installonlyn" plugin

Setting up Install Process

Setting up repositories

core 100% |=========================| 1.1 kB 00:00

updates 100% |=========================| 951 B 00:00

extras 100% |=========================| 1.1 kB 00:00

Reading repository metadata in from local files

primary.xml.gz 100% |=========================| 824 kB 00:23

################################################## 2242/2242

primary.xml.gz 100% |=========================| 318 kB 00:14

################################################## 1096/1096

primary.xml.gz 100% |=========================| 1.6 MB 00:47

################################################## 5001/5001

Parsing package install arguments

Resolving Dependencies

--> Populating transaction set with selected packages. Please wait.

---> Downloading header for gcc to pack into transaction set.

gcc-4.1.1-30.i386.rpm 100% |=========================| 51 kB 00:05

---> Package gcc.i386 0:4.1.1-30 set to be updated

--> Running transaction check

--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc

--> Processing Dependency: libgomp.so.1 for package: gcc

--> Processing Dependency: libgomp = 4.1.1-30 for package: gcc

--> Restarting Dependency Resolution with new changes.

--> Populating transaction set with selected packages. Please wait.

---> Downloading header for glibc-devel to pack into transaction set.

glibc-devel-2.5-3.i386.rp 100% |=========================| 103 kB 00:04

---> Package glibc-devel.i386 0:2.5-3 set to be updated

---> Downloading header for libgomp to pack into transaction set.

libgomp-4.1.1-30.i386.rpm 100% |=========================| 42 kB 00:03

---> Package libgomp.i386 0:4.1.1-30 set to be updated

--> Running transaction check

--> Processing Dependency: glibc-headers = 2.5-3 for package: glibc-devel

--> Processing Dependency: glibc-headers for package: glibc-devel

--> Restarting Dependency Resolution with new changes.

--> Populating transaction set with selected packages. Please wait.

---> Downloading header for glibc-headers to pack into transaction set.

glibc-headers-2.5-3.i386. 100% |=========================| 136 kB 00:11

---> Package glibc-headers.i386 0:2.5-3 set to be updated

--> Running transaction check

Dependencies Resolved

=============================================================================

Package Arch Version Repository Size

=============================================================================

Installing:

gcc i386 4.1.1-30 core 4.7 M

Installing for dependencies:

glibc-devel i386 2.5-3 core 2.0 M

glibc-headers i386 2.5-3 core 602 k

libgomp i386 4.1.1-30 core 62 k

Transaction Summary

=============================================================================

Install 4 Package(s)

Update 0 Package(s)

Remove 0 Package(s)

Total download size: 7.3 M

Is this ok [y/N]: y

Downloading Packages:

(1/4): gcc-4.1.1-30.i386. 100% |=========================| 4.7 MB 03:13

(2/4): glibc-headers-2.5- 100% |=========================| 602 kB 00:19

(3/4): glibc-devel-2.5-3. 100% |=========================| 2.0 MB 01:22

(4/4): libgomp-4.1.1-30.i 100% |=========================| 62 kB 00:02

warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2

Importing GPG key 0x4F2A6FD2 "Fedora Project "

Is this ok [y/N]: y

Importing GPG key 0xDB42A60E "Red Hat, Inc "

Is this ok [y/N]: y

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

Installing: libgomp ######################### [1/4]

Installing: glibc-headers ######################### [2/4]

Installing: glibc-devel ######################### [3/4]

Installing: gcc ######################### [4/4]

Installed: gcc.i386 0:4.1.1-30

Dependency Installed: glibc-devel.i386 0:2.5-3 glibc-headers.i386 0:2.5-3 libgomp.i386 0:4.1.1-30

Complete!

[root@localhost ~]#

2.安装kernel-devel

[root@localhost ~]#

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

Loading "installonlyn" plugin

Setting up Install Process

Setting up repositories

Reading repository metadata in from local files

Parsing package install arguments

Resolving Dependencies

--> Populating transaction set with selected packages. Please wait.

---> Downloading header for kernel-devel to pack into transaction set.

kernel-devel-2.6.18-1.284 100% |=========================| 696 kB 03:38

---> Package kernel-devel.i686 0:2.6.18-1.2849.fc6 set to be installed

--> Running transaction check

Dependencies Resolved

=============================================================================

Package Arch Version Repository Size

=============================================================================

Installing:

kernel-devel i686 2.6.18-1.2849.fc6 updates 4.6 M

Transaction Summary

=============================================================================

Install 1 Package(s)

Update 0 Package(s)

Remove 0 Package(s)

Total download size: 4.6 M

Is this ok [y/N]: y

Downloading Packages:

(1/1): kernel-devel-2.6.1 100% |=========================| 4.6 MB 20:22

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

Installing: kernel-devel ######################### [1/1]

Installed: kernel-devel.i686 0:2.6.18-1.2849.fc6

Complete!

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

[root@localhost ~]# uname -r

2.6.18-1.2798.fc6

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

kernel-devel-2.6.18-1.2849.fc6

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

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

Loading "installonlyn" plugin

Setting up Upgrade Process

Setting up repositories

core 100% |=========================| 1.1 kB 00:00

updates 100% |=========================| 951 B 00:00

http://ftp.uni-bayreuth.de/linux ... epodata/repomd.xml: [Errno 14] HTTP Error 504: Proxy-Connection: Keep-Alive

Connection: Keep-Alive

Content-Length: 3694

Via: 1.1 CL_PROXY

Content-Type: text/html

Pragma: no-cache

Cache-Control: no-cache

Trying other mirror.

extras 100% |=========================| 1.1 kB 00:00

Reading repository metadata in from local files

Could not find update match for kernel-devel

Resolving Dependencies

--> Populating transaction set with selected packages. Please wait.

---> Downloading header for kernel to pack into transaction set.

kernel-2.6.18-1.2849.fc6. 100% |=========================| 201 kB 00:02

---> Package kernel.i586 0:2.6.18-1.2849.fc6 set to be installed

--> Running transaction check

Dependencies Resolved

=============================================================================

Package Arch Version Repository Size

=============================================================================

Installing:

kernel i586 2.6.18-1.2849.fc6 updates 15 M

Transaction Summary

=============================================================================

Install 1 Package(s)

Update 0 Package(s)

Remove 0 Package(s)

Total download size: 15 M

Downloading Packages:

(1/1): kernel-2.6.18-1.28 100% |=========================| 15 MB 07:42

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

Installing: kernel ######################### [1/1]

Installed: kernel.i586 0:2.6.18-1.2849.fc6

Complete!

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

[root@localhost ~]# uname -r

2.6.18-1.2798.fc6

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

kernel-devel-2.6.18-1.2849.fc6

[root@localhost ~]#

[root@localhost ~]#

[root@localhost ~]# reboot

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

[root@localhost ~]# uname -r

2.6.18-1.2849.fc6

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

kernel-devel-2.6.18-1.2849.fc6

[root@localhost ~]#

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

[root@localhost ~]#

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

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

[root@localhost ~]#

[root@localhost ~]#

[root@localhost ~]#

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

A previous installation of VMware software has been detected.

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

Keeping the tar3 installer database format.

Uninstalling the tar installation of VMware Tools.

Stopping VMware Tools services in the virtual machine:

Guest operating system daemon: [确定]

File /etc/X11/xorg.conf is backed up to /etc/X11/xorg.conf.old.0.

File /etc/modprobe.conf is backed up to /etc/modprobe.conf.old.0.

The removal of VMware Tools 5.5.3 build-34685 for Linux completed successfully.

Thank you for having tried this software.

Installing the content of the package.

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/rc.d]

What is the directory that contains the init scripts?

[/etc/rc.d/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 5.5.3 build-34685 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] (运行vmware-config-tools来配置)

 

Stopping VMware Tools services in the virtual machine:

Guest operating system daemon: [确定]

Trying to find a suitable vmhgfs module for your running kernel.

None of the pre-built vmhgfs modules for VMware Tools is suitable for your

running kernel. Do you want this program to try to build the vmhgfs 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.

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

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

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

Extracting the sources of the vmhgfs module.

Building the vmhgfs module.

Using 2.6.x kernel build system.

make: Entering directory `/tmp/vmware-config3/vmhgfs-only'

make -C /usr/src/kernels/2.6.18-1.2849.fc6-i686/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules

make[1]: Entering directory `/usr/src/kernels/2.6.18-1.2849.fc6-i686'

CC [M] /tmp/vmware-config3/vmhgfs-only/cpName.o

CC [M] /tmp/vmware-config3/vmhgfs-only/cpNameLinux.o

CC [M] /tmp/vmware-config3/vmhgfs-only/dev.o

CC [M] /tmp/vmware-config3/vmhgfs-only/driver.o

CC [M] /tmp/vmware-config3/vmhgfs-only/hgfsUtil.o

CC [M] /tmp/vmware-config3/vmhgfs-only/main.o

CC [M] /tmp/vmware-config3/vmhgfs-only/staticEscape.o

LD [M] /tmp/vmware-config3/vmhgfs-only/vmhgfs.o

Building modules, stage 2.

MODPOST

CC /tmp/vmware-config3/vmhgfs-only/vmhgfs.mod.o

LD [M] /tmp/vmware-config3/vmhgfs-only/vmhgfs.ko

make[1]: Leaving directory `/usr/src/kernels/2.6.18-1.2849.fc6-i686'

cp -f vmhgfs.ko ./../vmhgfs.o

make: Leaving directory `/tmp/vmware-config3/vmhgfs-only'

Unable to make a vmhgfs module that can be loaded in the running kernel:

insmod: error inserting '/tmp/vmware-config3/vmhgfs.o': -1 Invalid module format

There is probably a slight difference in the kernel configuration between the

set of C header files you specified and your running kernel. You may want to

rebuild a kernel based on that directory, or specify another directory.

The filesystem driver (vmhgfs module) is used only for the shared folder

feature. The rest of the software provided by VMware Tools is designed to work

independently of this feature.

If you wish to have the shared folders feature, you can install the driver by

running vmware-config-tools.pl again after making sure that gcc, binutils, make

and the kernel sources for your running kernel are installed on your machine.

These packages are available on your distribution's installation CD.

[ Press Enter key to continue ]

pcnet32 38085 0

Unloading pcnet32 module

Trying to find a suitable vmxnet module for your running kernel.

None of the pre-built vmxnet modules for VMware Tools is suitable for your

running kernel. Do you want this program to try to build the vmxnet module for

your system (you need to have a C compiler installed on your system)? [yes]

Extracting the sources of the vmxnet module.

Building the vmxnet module.

Using 2.6.x kernel build system.

make: Entering directory `/tmp/vmware-config4/vmxnet-only'

make -C /usr/src/kernels/2.6.18-1.2849.fc6-i686/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules

make[1]: Entering directory `/usr/src/kernels/2.6.18-1.2849.fc6-i686'

CC [M] /tmp/vmware-config4/vmxnet-only/vmxnet.o

Building modules, stage 2.

MODPOST

CC /tmp/vmware-config4/vmxnet-only/vmxnet.mod.o

LD [M] /tmp/vmware-config4/vmxnet-only/vmxnet.ko

make[1]: Leaving directory `/usr/src/kernels/2.6.18-1.2849.fc6-i686'

cp -f vmxnet.ko ./../vmxnet.o

make: Leaving directory `/tmp/vmware-config4/vmxnet-only'

Unable to make a vmxnet module that can be loaded in the running kernel:

insmod: error inserting '/tmp/vmware-config4/vmxnet.o': -1 Invalid module format

There is probably a slight difference in the kernel configuration between the

set of C header files you specified and your running kernel. You may want to

rebuild a kernel based on that directory, or specify another directory.

The fast network device driver (vmxnet module) is used only for our fast

networking interface. The rest of the software provided by VMware Tools is

designed to work independently of this feature.

If you wish to have the fast network driver enabled, you can install the driver

by running vmware-config-tools.pl again after making sure that gcc, binutils,

make and the kernel sources for your running kernel are installed on your

machine. These packages are available on your distribution's installation CD.

[ Press Enter key to continue ]

 

Detected X.org version 7.1.

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

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

 

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

[1] "640x480"

[2]< "800x600"

[3] "1024x768"

[4] "1152x864"

[5] "1280x800"

[6] "1152x900"

[7] "1280x1024"

[8] "1376x1032"

[9] "1400x1050"

[10] "1680x1050"

[11] "1600x1200"

[12] "1920x1200"

[13] "2364x1773"

Please enter a number between 1 and 13:

[3]

 

11.到了这步,千万别重启看效果,还要修改xorg config设置,不然重启后会报X-WINDOWS出错。

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

Section "Monitor"

Identifier "vmware"

EndSection

Section "InputDevice"

Identifier "Mouse0"

Driver "vmmouse"

Option "Protocol" "Auto"

Option "Device" "/dev/input/mouse0"

EndSection

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

InputDevice "Mouse0" "CorePointer"

12.终于大功告成,重启看看效果了。