源地址:http://www.ehowstuff.com/how-to-install-vmware-tools-on-centos-6-3/
VMware Tools is a group of utilities that enhances the overall performance of the virtual machine’s guest operating system (OS) and improves management of the virtual machine (VM). This is one of important components in order to provide perfect VM OS. Without the VMware Tools,guest OS performance will lacks some of the important functionality. Please follow below steps to install the VMware Tools on CentOS 6.3:
1. Install prerequisites :
[root@centos63 ~]# yum install perl gcc make kernel-headers kernel-devel -y
2. Right click on the VM,goto Guest,Install/Upgrade VMware tools.
3. Mount VMware-tool installer :
[root@centos63 ~]# mount /dev/cdrom /mnt mount: block device /dev/sr0 is write-protected,mounting read-only
4. Extract and install :
[root@centos63 ~]# cd /mnt [root@centos63 mnt]# cp VMwareTools-2.0.0-122956.tar.gz /tmp [root@centos63 mnt]# cd /tmp [root@centos63 tmp]# umount /mnt [root@centos63 tmp]# tar xzvf VMwareTools-2.0.0-122956.tar.gz [root@centos63 tmp]# cd vmware-tools-distrib [root@centos63 vmware-tools-distrib]# ./vmware-install.pl
During the installation wizard,just press enter for default selection. For certain cases,you will get stuck on the following :
.. .. .. .. Stopping VMware Tools services in the virtual machine: Guest operating system daemon: [ OK ] None of the pre-built vmmemctl modules for VMware Tools is suitable for your running kernel. Do you want this program to try to build the vmmemctl 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.
What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include]
Solution :
What you can do is perform kernel updates,then reboot and finally re-run the VMware-tools installation script.
Steps
1. Perform update to kernel :
[root@centos63 vmware-tools-distrib]# yum update kernel -y Loaded plugins: fastestmirror,presto Loading mirror speeds from cached hostfile * base: mirrors.hostemo.com * extras: mirrors.hostemo.com * updates: mirrors.hostemo.com file:///mnt/repodata/repomd.xml: [Errno 14] Could not open/read file:///mnt/repodata/repomd.xml Trying other mirror. Setting up Update Process Resolving Dependencies --> Running transaction check ---> Package kernel.i686 0:2.6.32-279.1.1.el6 will be installed --> Processing Dependency: kernel-firmware >= 2.6.32-279.1.1.el6 for package: kernel-2.6.32-279.1.1.el6.i686 --> Running transaction check ---> Package kernel-firmware.noarch 0:2.6.32-279.el6 will be updated ---> Package kernel-firmware.noarch 0:2.6.32-279.1.1.el6 will be an update --> Finished Dependency ResolutionDependencies Resolved
====================================================================================================
Package Arch Version Repository SizeInstalling:
kernel i686 2.6.32-279.1.1.el6 updates 23 M
Updating for dependencies:
kernel-firmware noarch 2.6.32-279.1.1.el6 updates 8.7 MTransaction Summary
Install 1 Package(s)
Upgrade 1 Package(s)Total download size: 32 M
Downloading Packages:
Setting up and reading Presto delta metadata
updates/prestodelta | 41 kB 00:00
Processing delta metadata
Download delta size: 6.8 M
(1/2): kernel-2.6.32-279.el6_2.6.32-279.1.1.el6.i686.drpm | 5.6 MB 00:49
(2/2): kernel-firmware-2.6.32-279.el6_2.6.32-279.1.1.el6.noarch.drpm | 1.2 MB 00:11
Finishing rebuild of rpms,from deltarpms
| 32 MB 00:20
Presto reduced the update size by 79% (from 32 M to 6.8 M).
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : kernel-firmware-2.6.32-279.1.1.el6.noarch 1/3
Installing : kernel-2.6.32-279.1.1.el6.i686 2/3
Cleanup : kernel-firmware-2.6.32-279.el6.noarch 3/3
Verifying : kernel-firmware-2.6.32-279.1.1.el6.noarch 1/3
Verifying : kernel-2.6.32-279.1.1.el6.i686 2/3
Verifying : kernel-firmware-2.6.32-279.el6.noarch 3/3Installed:
kernel.i686 0:2.6.32-279.1.1.el6Dependency Updated:
kernel-firmware.noarch 0:2.6.32-279.1.1.el6Complete!
2. Reboot the CentOS 6.3
3. Re-run VMware-Tools installation :
[root@centos63 vmware-tools-distrib]# ./vmware-install.pl
A previous installation of VMware Tools has been detected.The previous installation was made by the tar installer (version 4).
Keeping the tar4 installer database format.
You have a version of VMware Tools installed. Continuing this install will
first uninstall the currently installed version. Do you wish to continue?
(yes/no) [yes]Uninstalling the tar installation of VMware Tools.
Stopping services for VMware Tools
Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: [ OK ]File /usr/lib/vmware-tools/lib32/libconf/etc/pango/pangorc is backed up to
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pangorc.old.2.This program previously created the file
/usr/lib/vmware-tools/libconf/etc/gtk-2.0/gtk.immodules,and was about to
remove it. Somebody else apparently did it already.File /usr/lib/vmware-tools/lib32/libconf/etc/pango/pangox.aliases is backed up
to /usr/lib/vmware-tools/lib32/libconf/etc/pango/pangox.aliases.old.2.File /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gdk-pixbuf.loaders is
backed up to
/usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gdk-pixbuf.loaders.old.2.This program previously created the file
/usr/lib/vmware-tools/libconf/etc/pango/pangorc,and was about to remove it.
Somebody else apparently did it already.This program previously created the file
/usr/lib/vmware-tools/libconf/etc/pango/pangox.aliases,and was about to remove
it. Somebody else apparently did it already.This program previously created the file
/usr/lib/vmware-tools/lib32/libconf/etc/pango/pango.modules,and was about to
remove it. Somebody else apparently did it already.This program previously created the file
/usr/lib/vmware-tools/libconf/etc/gtk-2.0/gdk-pixbuf.loaders,and was about to
remove it. Somebody else apparently did it already.File /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gtk.immodules is backed up
to /usr/lib/vmware-tools/lib32/libconf/etc/gtk-2.0/gtk.immodules.old.2.The removal of VMware Tools 2.0.0 build-122956 for Linux completed
successfully.Installing VMware Tools.
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]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 2.0.0 build-122956 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".