vm中的fc6成功安装vmware-tool全过程

转:
作者:vm-tool
该教程仅供和我一样初级学者参考,只要严格按照步骤,绝对可以在fc6上成功安装vmware-tool。大概步骤分10步:
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 < fedora@redhat.com>"
Is this ok [y/N]: y
Importing GPG key 0xDB42A60E "Red Hat, Inc < security@redhat.com>"
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.终于大功告成,重启看看效果了。

<think>好的,用户想在Ubuntu上安装VMware Tools,我需要根据提供的引用内容整理步骤。首先,看到引用[2]和[3]有具体的安装步骤,而引用[1]和[4]提供了一些注意事项。需要综合这些信息,确保步骤正确且简洁。 首先,用户可能已经知道VMware Tools的重要性,比如提升性能、改善交互等。根据引用[2],安装过程包括挂载镜像、复制文件、运行安装脚本。但引用[3]提到更简单的方法,使用apt安装open-vm-tools,这可能更适合新手,因为手动安装可能有依赖问题。另外,引用[4]提醒要正常关机,避免工具失效,这点需要注意。 需要比较两种方法:传统安装和使用open-vm-tools。根据引用[3],使用apt安装更简单,三步就能完成,可能更推荐。而引用[2]中的步骤较复杂,但可能适合特定情况。不过现在很多Linux发行版推荐使用open-vm-tools,所以应该优先建议这种方法。 然后整理步骤:先更新软件包,然后安装open-vm-tools和桌面组件,最后重启。同时,提醒用户正常关机,避免问题。此外,如果用户需要传统方式,再提供备选方案,但说明可能较复杂。 需要检查是否有冲突或遗漏。比如,引用[2]中的步骤包括挂载镜像和运行安装脚本,但引用[3]的方法更直接。可能用户更倾向简单的方法,所以主推apt安装,同时提到传统方法作为选项。还要注意是否需要先卸载旧版本,但引用中没有提到,可能不需要。 最后,确保回答结构清晰,分步骤说明,并加入注意事项。这样用户能轻松跟随,避免常见错误。</think>以下是Ubuntu系统上安装VMWare Tools的两种方法及详细步骤: ### 方法一:通过APT安装(推荐) 1. **更新软件包列表** ```bash sudo apt-get update ``` 2. **安装open-vm-tools核心组件** ```bash sudo apt-get install open-vm-tools ``` 3. **安装桌面增强功能(适用于图形界面)** ```bash sudo apt-get install open-vm-tools-desktop ``` 4. **重启系统生效** ```bash sudo reboot ``` ### 方法二:传统ISO镜像安装 1. **挂载安装镜像** - 点击VMware菜单栏的"虚拟机 > 安装VMware Tools" - 桌面会出现`VMware Tools`光盘图标 2. **复制安装文件到本地** ```bash cp /media/$USER/VMware\ Tools/VMwareTools-*.tar.gz ~/Desktop/ cd ~/Desktop tar -zxvf VMwareTools-*.tar.gz ``` 3. **执行安装脚本** ```bash cd vmware-tools-distrib/ sudo ./vmware-install.pl ``` - 安装过程中第一个提示输入`yes`,其他保持默认回车即可[^2] ### 注意事项 1. 安装完成后**必须正常重启系统**,直接关闭虚拟机可能导致功能异常[^4] 2. 若出现文件共享失效,可尝试重装: ```bash sudo vmware-config-tools.pl ``` 3. 推荐优先使用`open-vm-tools`,这是VMware官方维护的开源版本,与Ubuntu兼容性更好[^3] ### 验证安装 执行以下命令查看版本信息: ```bash vmware-toolbox-cmd -v ``` 成功安装后,可实现: - 主机与虚拟机间的**双向剪贴板共享** - **自适应分辨率调整** - **文件拖放传输** - 更流畅的3D图形加速
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值