Linux學習之CentOS(五)--CentOS下VMware-Tools安裝

已經進入到了Linux學習之CentOS的第六篇隨筆了,因此這裏就介紹一下VMware-Tools的安裝。python

VMware-Tools的安裝linux

VMware-Tools 主要的功能就是讓用戶在虛擬機和真實系統之間實現無縫切換,這個功能很方便。固然VMware-Tools最主要是實現linux和windows的文件共享。在上一篇隨筆中已經寫到,在虛擬機的Linux系統中,若是須要將windows上的一些文件上傳至Linux系統中,一般有三種方法,①安裝VMware-Tools②將文件製做成ISO文件,而後掛載到Linux系統上③經過共享文件夾的方式(這個須要先安裝VMware-Tools,不然沒法實現)。若虛擬機中安裝的是windows操做系統,安裝就很是簡單,直接雙擊點擊安裝便可。如圖:windows

 

直接選擇上方的VM -> Install VMware Tools(由於虛擬機啓動了CentOS,而且已經安裝好了VMware Tools,因此圖片顯示的可能和大家安裝時不同)centos

在Linux系統中,當啓動完Linux系統之後,VM虛擬機的下方會彈出一個提醒框,提示用戶是否須要在虛擬的Linux系統上安裝VMware-Tools。此時咱們能夠選擇OK,若是沒有出現提示,則按照上圖提示,本身手動選擇安裝便可。session

此時,咱們會發現Linux的桌面上加載了一個虛擬的光驅,打開之後裏面就是咱們須要安裝的VMware-Tools版本軟件,個人是(VMwareTools-8.4.6-385536.tar.gz)經過cp命令將該文件複製到/home目錄下,而後輸入一下命令:dom

[root@qdy ~]# mount /dev/cdrom /mnt/cdrom  # 加載光驅
[root@qdy ~]# cd /mnt/cdrom #進入光驅
[root@qdy cdrom]# ll
總用量 60608
-r--r--r--. 1 root root     1989 6月   7 2011 manifest.txt
-r--r--r--. 1 root root 62059831 6月   7 2011 VMwareTools-8.6.0-425873.tar.gz
[root@qdy cdrom]# cp VMwareTools-8.6.0-425873.tar.gz /home/xiaoming #複製文件至 home/xiaoming 目錄下
[root@qdy cdrom]# 

  

[root@xiaoluo /]#  tar -zxvf /home/VMwareTools-8.4.6-385536.tar.gz  #解壓到當前目錄
// 這個命令就是linux系統的解壓縮命令,大部分軟件在linux系統中是以.tar.gz、.bin、.rpm結尾的,對以.tar.gz格式文件咱們只需用tar -zxvf命令對其解壓便可

解壓之後咱們能夠在 /home 目錄下面發現一個文件夾 vmware-tools-distrib ,這個就是咱們經過以上那個命令解壓之後的文件夾。ide

複製代碼
[root@xiaoluo /]# cd /home/vmware-tools-distrib/    // 進入到剛解壓的VMware-Tools文件夾下
[root@xiaoluo vmware-tools-distrib]# ls -l        
總用量 568
drwxr-xr-x.  2 root root   4096 3月  26 2011 bin
drwxr-xr-x.  2 root root   4096 3月  26 2011 doc
drwxr-xr-x.  3 root root   4096 3月  26 2011 etc
-r--r--r--.  1 root root 557757 3月  26 2011 FILES
lrwxrwxrwx.  1 root root     13 3月  31 21:20 INSTALL -> ./doc/INSTALL
drwxr-xr-x.  2 root root   4096 3月  26 2011 installer
drwxr-xr-x. 17 root root   4096 3月  26 2011 lib
lrwxrwxrwx.  1 root root     31 3月  31 21:20 vmware-install.pl -> ./bin/vmware-uninstall-tools.pl  // 咱們須要執行的文件
複製代碼

而後咱們輸入:學習

[root@xiaoluo vmware-tools-distrib]# ./vmware-install.pl   // 安裝vm-tools (在linux系統中,【./】命令就是安裝、執行軟件)

這樣咱們就進入到了vm-tools安裝界面,此時界面會出現一大堆的文件安裝代碼,咱們只須要一直按着 enter 鍵便可。ui

複製代碼
下面的選項就按照默認值。一直回車就能夠

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 goingto 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 isgoing to create it, including needed parent directories. Is this what you want?
[yes]

The installation of VMware Tools 5.5.1 build-19175 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]

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

The module bld-2.6.9-5.EL-i686-RHEL4 loads perfectly in the running kernel.

pcnet32 30153 0
Unloading pcnet32 module

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

The module bld-2.6.9-5.EL-i686-RHEL4 loads perfectly in the running kernel.

Detected X.org version 6.8.

關閉控制檯鼠標服務: [ 肯定 ]
啓動控制檯鼠標服務: [ 肯定 ]

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

# 顯示分辨率,這裏是以 1024×768 爲例

# VMware Tools 安裝的時候,會自動修改 X server 的配置文件

[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×1050″
[10] 」1680×1050″
[11] 」1600×1200″
[12] 」1920×1200″
[13] 」2364×1773″
Please enter a number between 1 and 13:

[2] 3

X Window System Version 6.8.2
Release Date: 9 February 2005
X Protocol Version 11, Revision 0, Release 6.8.2
Build Operating System: Linux 2.6.9-34.EL i686 [ELF]
Current Operating System: Linux rd01.domain 2.6.9-34.EL #1 Wed Mar 8 00:07:35 CST 2006 i686
Build Date: 04 May 2006
Build Host: x8664-build.centos.org

Before reporting problems, check [url]http://wiki.X.Org[/url]
to make sure that you have the latest version.
Module Loader present
OS Kernel: Linux version 2.6.9-34.EL (buildcentos@build-i386) (gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)) #1 Wed Mar 8 00:07:35 CST 2006 P
Markers: (–) 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.3131″, Time: Mon Jun 12 20:57:34 2006
(++) Using config file: 「/tmp/vmware-config0/XF86Config.3131″
(WW) VMWARE(0): Failed to set up write-combining range (0xf0000000,0×1000000)

X is running fine with the new config file.

Starting VMware Tools services in the virtual machine:
Switching to guest configuration: [ 肯定   ]
Guest filesystem driver:             [ 肯定   ]
DMA setup:                        [ 肯定   ]
Guest operating system daemon:                         [ 肯定   ]

The configuration of VMware Tools 5.5.1 build-19175 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 XFree86 session.

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

Enjoy,

–the VMware team
複製代碼

最後,VMware-Tools安裝成功了,我們重啓一下Linux系統,會發現VMware-Tools已經安裝成功了,此時不但能夠直接在windows界面將須要的文件或者文件夾直接複製到虛擬機的Linux系統中,並且能夠經過文件共享來與windows系統創建無縫銜接:this

至此,在Linux系統上安裝VMware-Tools就成功告一段落了!!!!!

相關文章
相關標籤/搜索