[root@localhost ~]# ll total 2764868 -rw-------. 1 root root 1238 May 10 2017 anaconda-ks.cfg drwxr-xr-x. 3 root root 141 Oct 12 2017 CI drwxr-xr-x. 4 root root 45 Nov 30 13:30 docker -rw-r--r--. 1 root root 2457254895 May 3 16:32 harbor_db.tar.gz -rw-r--r--. 1 root root 317888971 Aug 29 2017 harbor-offline-installer-0.5.0.tgz -r--r--r--. 1 root root 56072885 May 4 08:54 VMwareTools-10.1.6-5214329.tar.gz drwxr-xr-x. 9 root root 145 Mar 17 2017 vmware-tools-distrib
4. 安装Cenos7编译环境
输入“cd vmware-tools-distrib/”进入名为“vmware-tools-distrib”的目录,输入“./vmware-install.pl”尝试安装,出现错误“-bash: ./vmware-install.pl: /usr/bin/per: bad interpreter: No such file or directory”,表明未安装编译环境。
1 2
# 使用yum来安装编译环境 yum -y install perl gcc make kernel-headers kernel-devel
# 查看当前系统的内核 [root@localhost ~]# uname -a Linux localhost 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
5. 安装WMwareTools
进入vmware-tools-distrib目录
1 2 3 4 5 6 7 8 9 10 11 12 13
[root@localhost ~]# cd vmware-tools-distrib/ [root@localhost vmware-tools-distrib]# ll total 368 drwxr-xr-x. 2 root root 87 Mar 17 2017 bin drwxr-xr-x. 5 root root 39 Mar 17 2017 caf drwxr-xr-x. 2 root root 67 Mar 17 2017 doc drwxr-xr-x. 5 root root 4096 Mar 17 2017 etc -rw-r--r--. 1 root root 149442 Mar 17 2017 FILES -rw-r--r--. 1 root root 2538 Mar 17 2017 INSTALL drwxr-xr-x. 2 root root 137 Mar 17 2017 installer drwxr-xr-x. 15 root root 202 Mar 17 2017 lib drwxr-xr-x. 3 root root 21 Mar 17 2017 vgauth -rwxr-xr-x. 1 root root 216748 Mar 17 2017 vmware-install.pl
执行安装命令
1
./vmware-install.pl
安装过程中的人机交互可以直接全部回车
6. 安装完成后的提示
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
The configuration of VMware Tools 10.1.6 build-5214329 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 "/usr/bin/vmware-toolbox-cmd" from the command line.
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.