CentOS7安裝VMware Tools

環(huán)境

  • 系統(tǒng):Windows 10
  • 虛擬機(jī):VMware ? Workstation 15 Pro 15.5.6 build-16341506
  • Centos:7.8

檢查

首先檢查系統(tǒng)里面是否安裝了 VMware Tools

  • 卸載預(yù)裝的 open-vm-tools 包,檢測(cè)是否預(yù)裝了 open-vm-tools
yum list installed | grep open-vm-*
  • 卸載預(yù)裝的程序包
yum remove open-vm-tools
  • 再次確認(rèn)是否卸載成功
rpm -qa | grep open-vm-*
  • 重啟虛擬機(jī)
reboot

安裝

點(diǎn)擊 VMware菜單欄【虛擬機(jī)(M)】,選擇【安裝VMware Tools(T)...】;如果安裝了早期版本的 VMware Tools,則菜單項(xiàng)為【更新 VMware Tools】

image-20201224111517844
image-20201224111837353
image-20201224111911403
image-20201224112027332
image-20201224112249454

掛載目錄

  • 查看 cdrom 目錄,在虛擬機(jī)中,以 root 身份登錄客戶機(jī)操作系統(tǒng),打開(kāi)終端窗口并運(yùn)行ls /dev命令查看是否含有 cdrom 目錄
image-20201224112556535
  • 創(chuàng)建 /mnt/cdrom

CD-ROM 掛載到其他目錄下,一般是將 /dev/cdrom 掛載到 /mnt/cdrom 目錄 使用 ls /mnt 查看是否已經(jīng)含有 /cdrom 目錄

image-20201224112815961

從上圖中可以發(fā)現(xiàn) /mnt 中含有 /cdrom 目錄,如果沒(méi)有出現(xiàn)上圖的 cdrom 目錄,則自己手動(dòng)創(chuàng)建一個(gè),使用命令 mkdir /mnt/cdrommkdir -p /mnt/cdrom(帶上 -p 則可以一次創(chuàng)建多個(gè)目錄),使用命令 ls /mnt 查看目錄是否創(chuàng)建成功

  • 掛載目錄

使用命令 mount -t iso9660 /dev/cdrom /mnt/cdrom 將光盤(pán)掛載在 /mnt/cdrom 目錄,并使用命令 ls /mnt/cdrom 查看是否掛載成功

image-20201224113339736

拷貝安裝包

  • 拷貝安裝包到 root 目錄

將后綴名為 tar.gz 的文件拷貝到 root 目錄下,使用命令 cp /mnt/cdrom/ VMwareTools-10.3.21-14772444.tar.gz ~ ,并用命令 ls ~ 查看是否復(fù)制成功

image-20201224113822688
  • 解除掛載

使用命令 umount /dev/cdrom 解除掛載

  • 解壓安裝包,解壓完成后使用命令ls ~查看是否解壓成功
[root@localhost ~]# tar -zxvf VMwareTools-10.3.21-14772444.tar.gz
[root@localhost ~]# ls ~
anaconda-ks.cfg  lnmp1.7  lnmp1.7.tar.gz  lnmp-install.log  VMwareTools-10.3.21-14772444.tar.gz  vmware-tools-distrib
[root@localhost ~]#

安裝VMware Tools

  • 進(jìn)入源碼文件目錄,使用命令 cd vmware-tools-distrib 進(jìn)入到解壓后的源碼文件目錄

  • 運(yùn)行 vmware-install.pl 文件

[root@localhost ~]# cd vmware-tools-distrib/
[root@localhost vmware-tools-distrib]# 
[root@localhost vmware-tools-distrib]# ./vmware-install.pl
open-vm-tools packages are available from the OS vendor and VMware recommends 
using open-vm-tools packages. See http://kb.vmware.com/kb/2073803 for more 
information.
Do you still want to proceed with this installation? [no] yes

INPUT: [yes]

輸入 yes 一路回車,然后檢查是否成功

Skipping rebuilding initrd boot image for kernel as no drivers to be included 
in boot image were installed by this installer.

Generating the key and certificate files.
Successfully generated the key and certificate files.
The configuration of VMware Tools 10.3.21 build-14772444 for Linux for this 
running kernel completed successfully.

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

To enable advanced X features (e.g., guest resolution fit, drag and drop, and 
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session
3. Restart your X session.

Enjoy,

--the VMware team

[root@localhost vmware-tools-distrib]# ls /mnt/hgfs/
project
[root@localhost vmware-tools-distrib]# 

搞定!

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容