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


已經進入到了Linux學習之CentOS的第六篇隨筆了,在這一篇隨筆里將總結一下在CentOS下常用的開發環境搭建,因為是學java的,所以這里就介紹一下VMware-Tools的安裝。

VMware-Tools的安裝

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

 

直接選擇上方的VM -> Install VMware Tools(因為虛擬機啟動了CentOS,並且已經安裝好了VMware Tools,所以圖片顯示的可能和你們安裝時不一樣)

在Linux系統中,當啟動完Linux系統以后,VM虛擬機的下方會彈出一個提醒框,提示用戶是否需要在虛擬的Linux系統上安裝VMware-Tools。此時我們可以選擇OK,如果沒有出現提示,則按照上圖提示,自己手動選擇安裝即可。

此時,我們會發現Linux的桌面上加載了一個虛擬的光驅,打開以后里面就是我們需要安裝的VMware-Tools版本軟件,我的是(VMwareTools-8.4.6-385536.tar.gz)通過cp命令將該文件復制到/home目錄下,然后輸入一下命令:

[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 ,這個就是我們通過以上那個命令解壓以后的文件夾。

[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 鍵即可。

下面的選項就按照默認值。一直回車就可以:

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 (113):

# 顯示分辨率,這里是以 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系統建立無縫銜接:

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

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM