工具/原料
- 新安装的CentOS 7虚拟机;
方法/步骤
-
1
在CentOS 7虚拟机安装完成之后,点击VMware Workstation下方提示中的“安装Tools按钮”或点击菜单“虚拟机->安装VMware Tools”启动VMware工具安装任务;
-
2
启动VMware工具安装任务后,CentOS 7中会弹出VMware Tools光盘挂载提示;
-
3
最小化CentOS中的“Getting Started界面”,然后双击桌面上的“VMware Tools光盘图标”,打开光盘内容;
-
4
将“VMware Tools光盘目录”中的“VMwareTools-10.0.1-3160059.tar.gz”文件拖拽到桌面上,然后关闭“VMware Tools光盘目录”;
-
5
右键单击桌面上的“VMwareTools-10.0.1-3160059.tar.gz”文件,在快捷菜单中,选择“Extract Here”,解压文件到当前位置上。提取完毕后,直接点击提示框中的关闭按钮关闭提示;
-
6
右键单击桌面上解压出来的“vmware-tools-distrib文件夹”,然后点击弹出菜单中的“移动到菜单项”,打开“目标位置选择窗口”;
-
7
当“选择移动目标位置窗口”出现时,会弹出“无法显示文件夹内容”的提示框,直接点击“确定按钮”关闭。这是由于默认打开位置不存在造成的;
-
8
点击“选择移动目标位置窗口”左侧的“其他位置”后,双击右侧出现”计算机->tmp”进入tmp目录。然后点击右上方的“选择按钮”选定移动到的目标位置;(放到这里是为了让之后用到的ROOT账户可以访问到)
-
9
在CentOS 7桌面空白处点击右键,选择弹出菜单中的“打开终端”,启动控制台程序;
10
在打开的“控制台窗口”中,输入命令“su -”并回车,将当前终端用户切换到root账户下;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-7a823d3bcc8ee727?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- 11
继续在控制台界面中,输入“cd /tmp/vmware-tools-distrib/”命令并回车,进入到“/tmp/vmware-tools-distrib/”目录下;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-0ebb86e252ccc02b?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- 12
继续在控制台界面中输入“./vmware-install.pl”命令并回车,VMware工具安装器会询问“是否允许安装器检测安装所需的内核驱动?”,直接按回车,采用默认值“yes”;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-385ea2fec3457842?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- 13
VMware Tools安装器继续询问“你希望将二进制文件安装到哪个目录?[默认值为/usr/bin]”。直接按回车,采用默认路径;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-0851e3c66a37117d?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- 14
VMware Tools安装器继续询问“请指定包含初始目录(从rc0.d/目录到rc6.d/目录)的目录路径?[默认值为/etc/rc.d])”。直接按回车,采用默认路径;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-4dd0a516ae8894d8?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- 15
VMware Tools安装器继续询问“请指定包含初始脚本的目录路径?[默认值为/etc/rc.d/init.d]”。直接按回车,采用默认路径;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-e44c6169d2533ec3?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- 16
VMware Tools安装器继续询问“请指定守护进程文件的安装位置?[默认值为/usr/sbin]”。直接按回车,采用默认路径;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-f50440a8f59cad12?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- 17
VMware Tools安装器继续询问“请指定库文件的安装位置?[默认值为/usr/lib/vmware-tools]”。直接按回车,采用默认路径;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-46223933ad0bc2eb?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- 18
VMware Tools安装器继续询问“由于/usr/lib/vmware-tools目录不存在,是否创建?[默认值为是]”。直接按回车,采用默认值,允许安装程序创建所需路径;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-2cc2f3f726e2cc3f?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- 19
VMware Tools安装器继续询问“请指定帮助文档的安装位置?[默认值为/usr/share/doc/vmware-tools]”。直接按回车,采用默认路径;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-ed8c5c70403bf28c?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- 20
VMware Tools安装器继续询问“/usr/share/doc/vmware-tools目录不存在,是否创建?[默认值为是]”。直接按回车,采用默认值,允许安装程序创建所需路径;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-ae4e7f73cc2ef5a5?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- VMware Tools安装器继续询问“在首次运行VMware工具之前,必须执行命令‘/usr/bin/vmware-config-tools.pl’配置VMware工具,是否现在执行?[默认值为是]”。直接按回车,允许执行;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-3d92cae397f21780?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- VMware Tools安装器继续询问“文件/usr/bin/vmware-hgfsclient已存在,是否覆盖?[默认值为否]”。直接按回车,不允许覆盖;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-34109ebaec493cc1?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- VMware Tools安装器继续询问“文件/usr/bin/vmhgfs-fuse已存在,是否覆盖?[默认值为否]”。直接按回车,不允许覆盖;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-3e0d162fa2ec6ebc?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- VMware Tools安装器继续询问“是否启用主机和虚拟机之间的共享文件夹功能?[默认值为是]”。直接按回车,允许启用文件夹共享功能;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-3e10714ec8ceea53?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- VMware Tools安装器继续询问“是否需要更改检测到的gcc目录?[默认值为否]”。直接按回车,不用更改gcc路径;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-92803f26749703be?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- VMware Tools安装器继续询问“是否需要更改检测到的内核头文件目录?[默认值为否]”。直接按回车,不必更改;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-160d8dbba38ed249?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- 等待gcc编译VMware工具文件夹共享的源代码(可惜编译失败了)。编译完毕后,直接按任意键结束VMware文件夹共享代码的编译;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-da1fd93ec7a20f4c?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-eb7e6e4e4a97f6c4?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- VMware Tools安装器继续询问“是否允许启用自动内核模块?[默认值为否]”。直接按回车,不启用;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-6e0343d46a6c4dd4?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- VMware Tools安装器继续询问“是否允许启用Thinprint提供的驱动无关打印?[默认值为是]”。直接按回车,启用此特征;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-50ab782beb673596?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
- VMware工具安装结束之后,即可获得从CentOS虚拟机和主机之间拖拽文件的功能;
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-ed6f6d8b15b074d5?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-bac6eb0118faba04?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![CentOS 7虚拟机中VMware Tools安装教程](https://upload-images.jianshu.io/upload_images/5257491-af12764d75274a0c?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
转载:https://jingyan.baidu.com/article/e8cdb32b136ad637052bad26.html