Install VMware Tools in CentOS 7 command line mode

安全劍客發表於2019-06-29

1.首先啟動 CentOS  7,在VMware中點選上方“VM”,點選“Install VMware Tools...”(如已安裝則顯示“Reinstall VMware Tools...”)。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

2.在 命令 行輸入“ls /dev”檢視。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

3.輸入“mkdir /mnt/cdrom”在/mnt目錄下新建一個名為cdrom的資料夾。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

4.輸入“mount -t iso9660 /dev/cdrom /mnt/cdrom”將光碟掛載到/mnt/cdrom目錄下。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

5.輸入“ls /mnt/cdrom/”檢視內容,輸入“cp /mnt/cdrom/VMwareTools-9.2.0-799703.tar.gz /root/vm.tar.gz”,

將名為“VMwareTools-9.2.0-799703.tar.gz”複製到/root目錄下,並重新命名為vm.tar.gz。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

6.在根目錄下輸入“ls”檢視檔案,輸入“tar -xzf vm.tar.gz”將檔案解壓,輸入“ls”檢視檔案,可發現新增目錄“vmware-tools-distrib”。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

7.輸入“cd vmware-tools-distrib/”進入名為“vmware-tools-distrib”的目錄,輸入“./vmware-install.pl”嘗試安裝,

出現錯誤“-bash: ./vmware-install.pl: /usr/bin/per: bad interpreter: No such file or directory”,表明未安裝編譯環境。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

8.輸入“yum -y install perl gcc make kernel-headers kernel-devel”開始安裝。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

9.提示已經安裝完畢。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

10.在“vmware-tools-distrib”目錄下重新輸入“./vmware-install.pl”開始安裝,基本上按Enter鍵即可。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

11.VMware Tools已經安裝完畢,提示可以執行“/usr/bin/vmware-uninstall-tools.pl” 命令 解除安裝VMware Tools。

第一次執行時需執行“/usr/bin/vmware-config-tools.pl”命令配置VMware Tools,按Enter鍵直接執行。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

12.提示已經安裝完畢,可以開始使用。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

13.輸入"/usr/bin/vmware-user"啟動vmware使用者程式,並輸入”startx“啟動圖形介面。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

14.選擇檔案(本例中為"測試文件.docx")並摁住滑鼠左鍵不放,嘗試拖動檔案到虛擬機器。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

15.放開滑鼠左鍵,發現檔案已經複製到虛擬機器。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

16.如需解除安裝VMware Tools,輸入“/usr/bin/vmware-uninstall-tools.pl”即可。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

17.如需在Gnome GUI圖形介面下安裝,則只需將檔案解壓,然後再資料夾裡點滑鼠右鍵,選擇“Open in Terminal”,在Terminal裡面輸入“./vmware-install.pl”即可。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

安裝故障

18.如安裝時出現類似下圖錯誤,提示無法刪除open-vm-tools,則可能是因為上次安裝失敗造成。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode

19.如嘗試輸入“/usr/bin/vmware-uninstall-tools.pl”仍無法解除安裝,則輸入“rpm -e open-vm-tools-desktop”解除安裝並重新安裝。
Install VMware Tools in CentOS 7 command line modeInstall VMware Tools in CentOS 7 command line mode


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31559985/viewspace-2649135/,如需轉載,請註明出處,否則將追究法律責任。

相關文章