1. 程式人生 > >linux下安裝vmtools方法

linux下安裝vmtools方法

長期有關注網路安全部落格的朋友應該有發現,最近網路安全部落格裡涉及linux的文章多了。呵呵,向前一篇提升liunx安全的幾種方法文章就有介紹了關於linux下提升安全係數的方法。今天在虛擬機器中想上網,整了半天,竟然有人跟我說是沒有安裝VMTOOLS的原因。以前在Ubuntu下是沒有安裝也能上。不過為了上網死馬當活馬醫了。弄了篇LINUX 虛擬機器上安裝vmtools的文章。希望大家會喜歡。

首先啟動VM_Linux系統 啟動後 在虛擬機器選單欄點“虛擬機器” 然後點“安裝VMware Tools” 然後虛擬機器會載入CD-ROM…有.TAR檔案 也有RPM檔案,我選擇了.TAR檔案(看網上的文章說相容效果能好點),
我是對其進行雙擊解壓的,將解壓檔案放在了/root的目錄下面,然後新建終端,進入解壓後的目錄(即:/root/vmware-tools-distrib),輸入 ./檔名.pl(“/”前面有個小點),之後回車,我第一次好象沒有安裝成功,出現瞭如下的結果:
[

[email protected] root]# cd vmware-tools-distrib
[[email protected] vmware-tools-distrib]# ./vmware-install.pl
Creating a new VMware Tools installer database using the tar4 format.

Installing VMware Tools. This may take from several minutes to over an hour
depending upon its size.

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]
yes
Execution aborted.

然後我重新啟動了一下虛擬機器,重新操作了一遍,這一次成功了,出現瞭如下的結果:
[[email protected] root]# cd vmware-tools-distrib
[[email protected] 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.

Uninstalling the tar installation of VMware Tools.

Skipping VMware Tools services shutdown on the host:       [ 確定 ]

The removal of VMware Tools 6.0.0 build-45731 for Linux completed successfully.
Thank you for having tried this software.

Installing VMware Tools. This may take from several minutes to over an hour
depending upon its size.

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] 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] yes

The installation of VMware Tools 6.0.0 build-45731 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] yes

Stopping VMware Tools services in the virtual machine:
Guest operating system daemon:                          [ 確定 ]
Trying to find a suitable vmmemctl module for your running kernel.

The module up-2.4.20-8.athlon-RH9.0 loads perfectly in the running kernel.

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

The module up-2.4.20-8.athlon-RH9.0 loads perfectly in the running kernel.

pcnet32                18016   0
Unloading pcnet32 module

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

The module up-2.4.20-8.athlon-RH9.0 loads perfectly in the running kernel.

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

The module up-2.4.20-8.athlon-RH9.0 loads perfectly in the running kernel.

[EXPERIMENTAL] The VMware CPU Time Accounting daemon (vmware-vmdesched) can
help increase the accuracy of CPU time accounting performed by the guest
operating system. Please refer to the VMware Knowledge Base for more details on
this capability. Do you wish to enable this feature? [no] no

[EXPERIMENTAL] The Virtual Machine Communication Interface (VMCI) service
provides a new communication capability with the Host, primarily for
development at the moment. Would you like to enable this feature? [no] no

Detected XFree86 version 4.3.0.

Please choose one of the following display sizes that X will start with (1 -
15):

[1] “640×480″
[2] “800×600″
[3]< “1024×768″
[4] “1152×864″
[5] “1280×800″
[6] “1152×900″
[7] “1280×1024″
[8] “1376×1032″
[9] “1400×900″
[10] “1400×1050″
[11] “1440×900″
[12] “1680×1050″
[13] “1600×1200″
[14] “1920×1200″
[15] “2364×1773″
Please enter a number between 1 and 15:

[3] 3

XFree86 Version 4.3.0 (Red Hat Linux release: 4.3.0-2)
Release Date: 27 February 2003
X Protocol Version 11, Revision 0, Release 6.6
Build Operating System: Linux 2.4.20-3bigmem i686 [ELF]
Build Date: 27 February 2003
Build Host: porky.devel.redhat.com

Before reporting problems, check http://www.XFree86.Org/
to make sure that you have the latest version.
Module Loader present
OS Kernel: Linux version 2.4.20-8 ([email protected]) (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1 Thu Mar 13 17:18:24 EST 2003 PFMarkers: (–) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: “/tmp/vmware-config0/XF86ConfigLog.3622″, Time: Mon Jul 21 01:44:44 2008
(++) Using config file: “/tmp/vmware-config0/XF86Config.3622″

X is running fine with the new config file.

Starting VMware Tools services in the virtual machine:
Switching to guest configuration:                       [ 確定 ]
Guest filesystem driver:                                [ 確定 ]
Mounting HGFS shares:                                   [失敗]
Guest memory manager:                                   [ 確定 ]
Guest vmxnet fast network device:                       [ 確定 ]
Blocking file system:                                   [ 確定 ]
DMA setup:                                              [ 確定 ]
Guest operating system daemon:                          [ 確定 ]

The configuration of VMware Tools 6.0.0 build-45731 for Linux for this running
kernel completed successfully.

You must restart your X session before any mouse or graphics changes take
effect.

You can now run VMware Tools by invoking the following command:
“/usr/bin/vmware-toolbox” during an X server session.

To use the vmxnet driver, restart networking using the following commands:
/etc/init.d/network stop
rmmod pcnet32
rmmod vmxnet
modprobe vmxnet
/etc/init.d/network start

To make use of the virtual printer, you will need to restart the CUPS service

If you wish to configure any experimental features, please run the following
command: “vmware-config-tools.pl –experimental”.

Enjoy,

–the VMware team
就此VMTools安裝成功。

注:
遇到這樣的情況
Unable to create symbolic link "/usr/lib/vmware-tools/bin"
Unable to create symbolic link "/usr/lib/vmware-tools/libconf"
Unable to create symbolic link "/usr/lib64/libvmcf.so"
就輸入
   sudo rm -rf /usr/lib/vmware-tools/libconf
   sudo rm -rf /usr/lib/vmware-tools/bin
   sudo rm -rf /usr/lib/vmware-tools/