7utLinux联盟
1.安装C编译器 7utLinux联盟
2.安装kernel-devel 7utLinux联盟
3.检查kernel跟kernel-devel的版本号 7utLinux联盟
4.两个版本号不一致,进行升级 7utLinux联盟
5.再次检查版本号,还不一致,需要重启。 7utLinux联盟
6.重启后,版本号一致。 7utLinux联盟
7.用ls命令查看匹配kernel的c编译器的header的路径 7utLinux联盟
8.安装vmware-tool 7utLinux联盟
9.选择屏幕分辨率。 7utLinux联盟
10.还要修改xorg config设置 7utLinux联盟
详细请看下面:: 7utLinux联盟
本教程绝对原创,转载请注明出处,谢谢,祝大家好运。 7utLinux联盟
1.安装c编译器 7utLinux联盟
[root@localhost ~]# yum install gcc 7utLinux联盟
Loading "installonlyn" plugin 7utLinux联盟
Setting up Install Process 7utLinux联盟
Setting up repositories 7utLinux联盟
core 100% |=========================| 1.1 kB 00:00 7utLinux联盟
updates 100% |=========================| 951 B 00:00 7utLinux联盟
extras 100% |=========================| 1.1 kB 00:00 7utLinux联盟
Reading repository metadata in from local files 7utLinux联盟
primary.xml.gz 100% |=========================| 824 kB 00:23 7utLinux联盟
################################################## 2242/2242 7utLinux联盟
primary.xml.gz 100% |=========================| 318 kB 00:14 7utLinux联盟
################################################## 1096/1096 7utLinux联盟
primary.xml.gz 100% |=========================| 1.6 MB 00:47 7utLinux联盟
################################################## 5001/5001 7utLinux联盟
Parsing package install arguments 7utLinux联盟
Resolving Dependencies 7utLinux联盟
--> Populating transaction set with selected packages. Please wait. 7utLinux联盟
---> Downloading header for gcc to pack into transaction set. 7utLinux联盟
gcc-4.1.1-30.i386.rpm 100% |=========================| 51 kB 00:05 7utLinux联盟
---> Package gcc.i386 0:4.1.1-30 set to be updated 7utLinux联盟
--> Running transaction check 7utLinux联盟
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc 7utLinux联盟
--> Processing Dependency: libgomp.so.1 for package: gcc 7utLinux联盟
--> Processing Dependency: libgomp = 4.1.1-30 for package: gcc 7utLinux联盟
--> Restarting Dependency Resolution with new changes. 7utLinux联盟
--> Populating transaction set with selected packages. Please wait. 7utLinux联盟
---> Downloading header for glibc-devel to pack into transaction set. 7utLinux联盟
glibc-devel-2.5-3.i386.rp 100% |=========================| 103 kB 00:04 7utLinux联盟
---> Package glibc-devel.i386 0:2.5-3 set to be updated 7utLinux联盟
---> Downloading header for libgomp to pack into transaction set. 7utLinux联盟
libgomp-4.1.1-30.i386.rpm 100% |=========================| 42 kB 00:03 7utLinux联盟
---> Package libgomp.i386 0:4.1.1-30 set to be updated 7utLinux联盟
--> Running transaction check 7utLinux联盟
--> Processing Dependency: glibc-headers = 2.5-3 for package: glibc-devel 7utLinux联盟
--> Processing Dependency: glibc-headers for package: glibc-devel 7utLinux联盟
--> Restarting Dependency Resolution with new changes. 7utLinux联盟
--> Populating transaction set with selected packages. Please wait. 7utLinux联盟
---> Downloading header for glibc-headers to pack into transaction set. 7utLinux联盟
glibc-headers-2.5-3.i386. 100% |=========================| 136 kB 00:11 7utLinux联盟
---> Package glibc-headers.i386 0:2.5-3 set to be updated 7utLinux联盟
--> Running transaction check 7utLinux联盟
Dependencies Resolved 7utLinux联盟
========================== 7utLinux联盟
Package Arch Version Repository Size 7utLinux联盟
=========================== 7utLinux联盟
Installing: 7utLinux联盟
gcc i386 4.1.1-30 core 4.7 M 7utLinux联盟
Installing for dependencies: 7utLinux联盟
glibc-devel i386 2.5-3 core 2.0 M 7utLinux联盟
glibc-headers i386 2.5-3 core 602 k 7utLinux联盟
libgomp i386 4.1.1-30 core 62 k 7utLinux联盟
Transaction Summary 7utLinux联盟
============================ 7utLinux联盟
Install 4 Package(s) 7utLinux联盟
Update 0 Package(s) 7utLinux联盟
Remove 0 Package(s) 7utLinux联盟
Total download size: 7.3 M 7utLinux联盟
Is this ok [y/N]: y 7utLinux联盟
Downloading Packages: 7utLinux联盟
(1/4): gcc-4.1.1-30.i386. 100% |=========================| 4.7 MB 03:13 7utLinux联盟
(2/4): glibc-headers-2.5- 100% |=========================| 602 kB 00:19 7utLinux联盟
(3/4): glibc-devel-2.5-3. 100% |=========================| 2.0 MB 01:22 7utLinux联盟
(4/4): libgomp-4.1.1-30.i 100% |=========================| 62 kB 00:02 7utLinux联盟
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 4f2a6fd2 7utLinux联盟
Importing GPG key 0x4F2A6FD2 "Fedora Project " 7utLinux联盟
Is this ok [y/N]: y 7utLinux联盟
Importing GPG key 0xDB42A60E "Red Hat, Inc " 7utLinux联盟
Is this ok [y/N]: y 7utLinux联盟
Running Transaction Test 7utLinux联盟
Finished Transaction Test 7utLinux联盟
Transaction Test Succeeded 7utLinux联盟
Running Transaction 7utLinux联盟
Installing: libgomp ######################### [1/4] 7utLinux联盟
Installing: glibc-headers ######################### [2/4] 7utLinux联盟
Installing: glibc-devel ######################### [3/4] 7utLinux联盟
Installing: gcc ######################### [4/4] 7utLinux联盟
Installed: gcc.i386 0:4.1.1-30 7utLinux联盟
Dependency Installed: glibc-devel.i386 0:2.5-3 glibc-headers.i386 0:2.5-3 libgomp.i386 0:4.1.1-30 7utLinux联盟
Complete! 7utLinux联盟
[root@localhost ~]# 7utLinux联盟
2.安装kernel-devel 7utLinux联盟
[root@localhost ~]# 7utLinux联盟
[root@localhost ~]# yum install kernel-devel 7utLinux联盟
Loading "installonlyn" plugin 7utLinux联盟
Setting up Install Process 7utLinux联盟
Setting up repositories 7utLinux联盟
Reading repository metadata in from local files 7utLinux联盟
Parsing package install arguments 7utLinux联盟
Resolving Dependencies 7utLinux联盟
--> Populating transaction set with selected packages. Please wait. 7utLinux联盟
---> Downloading header for kernel-devel to pack into transaction set. 7utLinux联盟
kernel-devel-2.6.18-1.284 100% |=========================| 696 kB 03:38 7utLinux联盟
---> Package kernel-devel.i686 0:2.6.18-1.2849.fc6 set to be installed 7utLinux联盟
--> Running transaction check 7utLinux联盟
Dependencies Resolved 7utLinux联盟
============================== 7utLinux联盟
Package Arch Version Repository Size 7utLinux联盟
========================== 7utLinux联盟
Installing: 7utLinux联盟
kernel-devel i686 2.6.18-1.2849.fc6 updates 4.6 M 7utLinux联盟
Transaction Summary 7utLinux联盟
============================= 7utLinux联盟
Install 1 Package(s) 7utLinux联盟
Update 0 Package(s) 7utLinux联盟
Remove 0 Package(s) 7utLinux联盟
Total download size: 4.6 M 7utLinux联盟
Is this ok [y/N]: y 7utLinux联盟
Downloading Packages: 7utLinux联盟
(1/1): kernel-devel-2.6.1 100% |=========================| 4.6 MB 20:22 7utLinux联盟
Running Transaction Test 7utLinux联盟
Finished Transaction Test 7utLinux联盟
Transaction Test Succeeded 7utLinux联盟
Running Transaction 7utLinux联盟
Installing: kernel-devel ######################### [1/1] 7utLinux联盟
Installed: kernel-devel.i686 0:2.6.18-1.2849.fc6 7utLinux联盟
Complete! 7utLinux联盟
3.检查kernel跟kernel-devel的版本号 7utLinux联盟
[root@localhost ~]# uname -r 7utLinux联盟
2.6.18-1.2798.fc6 7utLinux联盟
[root@localhost ~]# rpm -q kernel-devel 7utLinux联盟
kernel-devel-2.6.18-1.2849.fc6 7utLinux联盟
4.两个版本号不一致,进行升级 7utLinux联盟
[root@localhost ~]# yum -y upgrade kernel kernel-devel 7utLinux联盟
Loading "installonlyn" plugin 7utLinux联盟
Setting up Upgrade Process 7utLinux联盟
Setting up repositories 7utLinux联盟
core 100% |=========================| 1.1 kB 00:00 7utLinux联盟
updates 100% |=========================| 951 B 00:00 7utLinux联盟
http://ftp.uni-bayreuth.de/linux ... epodata/repomd.xml: [Errno 14] HTTP Error 504: Proxy-Connection: Keep-Alive 7utLinux联盟
Connection: Keep-Alive 7utLinux联盟
Content-Length: 3694 7utLinux联盟
Via: 1.1 CL_PROXY 7utLinux联盟
Content-Type: text/html 7utLinux联盟
Pragma: no-cache 7utLinux联盟
Cache-Control: no-cache 7utLinux联盟
Trying other mirror. 7utLinux联盟
extras 100% |=========================| 1.1 kB 00:00 7utLinux联盟
Reading repository metadata in from local files 7utLinux联盟
Could not find update match for kernel-devel 7utLinux联盟
Resolving Dependencies 7utLinux联盟
--> Populating transaction set with selected packages. Please wait. 7utLinux联盟
---> Downloading header for kernel to pack into transaction set. 7utLinux联盟
kernel-2.6.18-1.2849.fc6. 100% |=========================| 201 kB 00:02 7utLinux联盟
---> Package kernel.i586 0:2.6.18-1.2849.fc6 set to be installed 7utLinux联盟
--> Running transaction check 7utLinux联盟
Dependencies Resolved ================================= 7utLinux联盟
Package Arch Version Repository Size 7utLinux联盟
===================== 7utLinux联盟
Installing: 7utLinux联盟
kernel i586 2.6.18-1.2849.fc6 updates 15 M 7utLinux联盟
Transaction Summary 7utLinux联盟
======================== 7utLinux联盟
Install 1 Package(s) 7utLinux联盟
Update 0 Package(s) 7utLinux联盟
Remove 0 Package(s) 7utLinux联盟
Total download size: 15 M 7utLinux联盟
Downloading Packages: 7utLinux联盟
(1/1): kernel-2.6.18-1.28 100% |=========================| 15 MB 07:42 7utLinux联盟
Running Transaction Test 7utLinux联盟
Finished Transaction Test 7utLinux联盟
Transaction Test Succeeded 7utLinux联盟
Running Transaction 7utLinux联盟
Installing: kernel ######################### [1/1] 7utLinux联盟
Installed: kernel.i586 0:2.6.18-1.2849.fc6 7utLinux联盟
Complete! 7utLinux联盟
5.再次检查版本号,还不一致,需要重启。 7utLinux联盟
[root@localhost ~]# uname -r 7utLinux联盟
2.6.18-1.2798.fc6 7utLinux联盟
[root@localhost ~]# rpm -q kernel-devel 7utLinux联盟
kernel-devel-2.6.18-1.2849.fc6 7utLinux联盟
[root@localhost ~]# 7utLinux联盟
[root@localhost ~]# 7utLinux联盟
[root@localhost ~]# reboot 7utLinux联盟
6.重启后,版本号一致。 7utLinux联盟
[root@localhost ~]# uname -r 7utLinux联盟
2.6.18-1.2849.fc6 7utLinux联盟
[root@localhost ~]# rpm -q kernel-devel 7utLinux联盟
kernel-devel-2.6.18-1.2849.fc6 7utLinux联盟
[root@localhost ~]# 7utLinux联盟
7.用ls命令查看匹配kernel的c编译器的header的路径 7utLinux联盟
[root@localhost ~]# 7utLinux联盟
[root@localhost ~]# ls -d /usr/src/kernels/$(uname -r)*/include 7utLinux联盟
/usr/src/kernels/2.6.18-1.2849.fc6-i686/include(记住该路径,安装vmware-tool时需要用到) 7utLinux联盟
[root@localhost ~]# 7utLinux联盟
[root@localhost ~]# 7utLinux联盟
[root@localhost ~]# 7utLinux联盟
8.安装vmware-tool。先释放鼠标,在vmware中选择安装vmware-tool,进入fc6,打开光驱,拷贝VMware- workstation-5.5.2-29772.tar.gz,将其解压到任何位置。解压后,双击vmware-install.pl,选择在终端运 行,然后一直按默认设置,一路按回车键。 7utLinux联盟
A previous installation of VMware software has been detected. 7utLinux联盟
The previous installation was made by the tar installer (version 3). 7utLinux联盟
Keeping the tar3 installer database format. 7utLinux联盟
Uninstalling the tar installation of VMware Tools. 7utLinux联盟
Stopping VMware Tools services in the virtual machine: 7utLinux联盟
Guest operating system daemon: [确定] 7utLinux联盟
File /etc/X11/xorg.conf is backed up to /etc/X11/xorg.conf.old.0. 7utLinux联盟
File /etc/modprobe.conf is backed up to /etc/modprobe.conf.old.0. 7utLinux联盟
The removal of VMware Tools 5.5.3 build-34685 for Linux completed successfully. 7utLinux联盟
Thank you for having tried this software. 7utLinux联盟
Installing the content of the package. 7utLinux联盟
In which directory do you want to install the binary files? 7utLinux联盟
[/usr/bin] 7utLinux联盟
What is the directory that contains the init directories (rc0.d/ to rc6.d/)? 7utLinux联盟
[/etc/rc.d] 7utLinux联盟
What is the directory that contains the init scripts? 7utLinux联盟
[/etc/rc.d/init.d] 7utLinux联盟
In which directory do you want to install the daemon files? 7utLinux联盟
[/usr/sbin] 7utLinux联盟
In which directory do you want to install the library files? 7utLinux联盟
[/usr/lib/vmware-tools] 7utLinux联盟
The path "/usr/lib/vmware-tools" does not exist currently. This program is 7utLinux联盟
going to create it, including needed parent directories. Is this what you want? 7utLinux联盟
[yes] 7utLinux联盟
In which directory do you want to install the documentation files? 7utLinux联盟
[/usr/share/doc/vmware-tools] 7utLinux联盟
The path "/usr/share/doc/vmware-tools" does not exist currently. This program 7utLinux联盟
is going to create it, including needed parent directories. Is this what you 7utLinux联盟
want? [yes] 7utLinux联盟
The installation of VMware Tools 5.5.3 build-34685 for Linux completed 7utLinux联盟
successfully. You can decide to remove this software from your system at any 7utLinux联盟
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl". 7utLinux联盟
Before running VMware Tools for the first time, you need to configure it by 7utLinux联盟
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want 7utLinux联盟
this program to invoke the command for you now? [yes] (运行vmware-config-tools来配置) 7utLinux联盟
Stopping VMware Tools services in the virtual machine: 7utLinux联盟
Guest operating system daemon: [确定] 7utLinux联盟
Trying to find a suitable vmhgfs module for your running kernel. 7utLinux联盟
None of the pre-built vmhgfs modules for VMware Tools is suitable for your 7utLinux联盟
running kernel. Do you want this program to try to build the vmhgfs module for 7utLinux联盟
your system (you need to have a C compiler installed on your system)? [yes] 7utLinux联盟
Using compiler "/usr/bin/gcc". Use environment variable CC to override. 7utLinux联盟
9.直到该步骤,拷贝粘贴第7步的路径,然后一直按回车,直到选择屏幕分辨率。 7utLinux联盟
What is the location of the directory of C header files that match your running 7utLinux联盟
kernel? [/usr/src/kernels/2.6.18-1.2849.fc6-i686/include] 7utLinux联盟
Extracting the sources of the vmhgfs module. 7utLinux联盟
Building the vmhgfs module. 7utLinux联盟
Using 2.6.x kernel build system. 7utLinux联盟
make: Entering directory `/tmp/vmware-config3/vmhgfs-only' 7utLinux联盟
make -C /usr/src/kernels/2.6.18-1.2849.fc6-i686/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules 7utLinux联盟
make[1]: Entering directory `/usr/src/kernels/2.6.18-1.2849.fc6-i686' 7utLinux联盟
CC [M] /tmp/vmware-config3/vmhgfs-only/cpName.o 7utLinux联盟
CC [M] /tmp/vmware-config3/vmhgfs-only/cpNameLinux.o 7utLinux联盟
CC [M] /tmp/vmware-config3/vmhgfs-only/dev.o 7utLinux联盟
CC [M] /tmp/vmware-config3/vmhgfs-only/driver.o 7utLinux联盟
CC [M] /tmp/vmware-config3/vmhgfs-only/hgfsUtil.o 7utLinux联盟
CC [M] /tmp/vmware-config3/vmhgfs-only/main.o 7utLinux联盟
CC [M] /tmp/vmware-config3/vmhgfs-only/staticEscape.o 7utLinux联盟
LD [M] /tmp/vmware-config3/vmhgfs-only/vmhgfs.o 7utLinux联盟
Building modules, stage 2. 7utLinux联盟
MODPOST 7utLinux联盟
CC /tmp/vmware-config3/vmhgfs-only/vmhgfs.mod.o 7utLinux联盟
LD [M] /tmp/vmware-config3/vmhgfs-only/vmhgfs.ko 7utLinux联盟
make[1]: Leaving directory `/usr/src/kernels/2.6.18-1.2849.fc6-i686' 7utLinux联盟
cp -f vmhgfs.ko ./../vmhgfs.o 7utLinux联盟
make: Leaving directory `/tmp/vmware-config3/vmhgfs-only' 7utLinux联盟
Unable to make a vmhgfs module that can be loaded in the running kernel: 7utLinux联盟
insmod: error inserting '/tmp/vmware-config3/vmhgfs.o': -1 Invalid module format 7utLinux联盟
There is probably a slight difference in the kernel configuration between the 7utLinux联盟
set of C header files you specified and your running kernel. You may want to 7utLinux联盟
rebuild a kernel based on that directory, or specify another directory. 7utLinux联盟
The filesystem driver (vmhgfs module) is used only for the shared folder 7utLinux联盟
feature. The rest of the software provided by VMware Tools is designed to work 7utLinux联盟
independently of this feature. 7utLinux联盟
If you wish to have the shared folders feature, you can install the driver by 7utLinux联盟
running vmware-config-tools.pl again after making sure that gcc, binutils, make 7utLinux联盟
and the kernel sources for your running kernel are installed on your machine. 7utLinux联盟
These packages are available on your distribution's installation CD. 7utLinux联盟
[ Press Enter key to continue ] 7utLinux联盟
pcnet32 38085 0 7utLinux联盟
Unloading pcnet32 module 7utLinux联盟
Trying to find a suitable vmxnet module for your running kernel. 7utLinux联盟
None of the pre-built vmxnet modules for VMware Tools is suitable for your 7utLinux联盟
running kernel. Do you want this program to try to build the vmxnet module for 7utLinux联盟
your system (you need to have a C compiler installed on your system)? [yes] 7utLinux联盟
Extracting the sources of the vmxnet module. 7utLinux联盟
Building the vmxnet module. 7utLinux联盟
Using 2.6.x kernel build system. 7utLinux联盟
make: Entering directory `/tmp/vmware-config4/vmxnet-only' 7utLinux联盟
make -C /usr/src/kernels/2.6.18-1.2849.fc6-i686/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules 7utLinux联盟
make[1]: Entering directory `/usr/src/kernels/2.6.18-1.2849.fc6-i686' 7utLinux联盟
CC [M] /tmp/vmware-config4/vmxnet-only/vmxnet.o 7utLinux联盟
Building modules, stage 2. 7utLinux联盟
MODPOST 7utLinux联盟
CC /tmp/vmware-config4/vmxnet-only/vmxnet.mod.o 7utLinux联盟
LD [M] /tmp/vmware-config4/vmxnet-only/vmxnet.ko 7utLinux联盟
make[1]: Leaving directory `/usr/src/kernels/2.6.18-1.2849.fc6-i686' 7utLinux联盟
cp -f vmxnet.ko ./../vmxnet.o 7utLinux联盟
make: Leaving directory `/tmp/vmware-config4/vmxnet-only' 7utLinux联盟
Unable to make a vmxnet module that can be loaded in the running kernel: 7utLinux联盟
insmod: error inserting '/tmp/vmware-config4/vmxnet.o': -1 Invalid module format 7utLinux联盟
There is probably a slight difference in the kernel configuration between the 7utLinux联盟
set of C header files you specified and your running kernel. You may want to 7utLinux联盟
rebuild a kernel based on that directory, or specify another directory. 7utLinux联盟
The fast network device driver (vmxnet module) is used only for our fast 7utLinux联盟
networking interface. The rest of the software provided by VMware Tools is 7utLinux联盟
designed to work independently of this feature. 7utLinux联盟
If you wish to have the fast network driver enabled, you can install the driver 7utLinux联盟
by running vmware-config-tools.pl again after making sure that gcc, binutils, 7utLinux联盟
make and the kernel sources for your running kernel are installed on your 7utLinux联盟
machine. These packages are available on your distribution's installation CD. 7utLinux联盟
[ Press Enter key to continue ] 7utLinux联盟
Detected X.org version 7.1. 7utLinux联盟
10.到了该步骤,问你是否改变X-window的设置,选y,就可以改变分辨率。 7utLinux联盟
Do you want to change your guest X resolution? (yes/no) [no] y 7utLinux联盟
Please choose one of the following display sizes (1 - 13): 7utLinux联盟
[1] "640x480" 7utLinux联盟
[2]< "800x600" 7utLinux联盟
[3] "1024x768" 7utLinux联盟
[4] "1152x864" 7utLinux联盟
[5] "1280x800" 7utLinux联盟
[6] "1152x900" 7utLinux联盟
[7] "1280x1024" 7utLinux联盟
[8] "1376x1032" 7utLinux联盟
[9] "1400x1050" 7utLinux联盟
[10] "1680x1050" 7utLinux联盟
[11] "1600x1200" 7utLinux联盟
[12] "1920x1200" 7utLinux联盟
[13] "2364x1773" 7utLinux联盟
Please enter a number between 1 and 13: 7utLinux联盟
[3] 7utLinux联盟
11.到了这步,千万别重启看效果,还要修改xorg config设置,不然重启后会报X-WINDOWS出错。 7utLinux联盟
进入/etc/X11/,用文本打开xorg.conf,加上以下几段: 7utLinux联盟
Section "Monitor" 7utLinux联盟
Identifier "vmware" 7utLinux联盟
EndSection 7utLinux联盟
Section "InputDevice" 7utLinux联盟
Identifier "Mouse0" 7utLinux联盟
Driver "vmmouse" 7utLinux联盟
Option "Protocol" "Auto" 7utLinux联盟
Option "Device" "/dev/input/mouse0" 7utLinux联盟
EndSection 7utLinux联盟
然后找到 含有"ServerLayout" 的section, 在Section跟EndSection之间加上以下一行。 7utLinux联盟
InputDevice "Mouse0" "CorePointer" 7utLinux联盟
12.终于大功告成,重启看看效果了。7utLinux联盟