文档章节

VMware——在CentOS中安装VMware Tools

o
 osc_5h5udyht
发布于 07/02 16:32
字数 1971
阅读 38
收藏 0

「深度学习福利」大神带你进阶工程师,立即查看>>>

VMware——在CentOS中安装VMware Tools

摘要:本文主要记录了如何在VMware中的CentOS系统中,安装VMware Tools。

安装依赖

查看系统相关信息:

1 [root@localhost ~]# uname -r
2 3.10.0-327.el7.x86_64

查看已经安装的kernel版本:

1 [root@localhost ~]# rpm -qa | grep kernel
2 kernel-tools-libs-3.10.0-327.el7.x86_64
3 kernel-3.10.0-327.el7.x86_64
4 kernel-tools-3.10.0-327.el7.x86_64

如果结果列表中有同系统版本不相同的版本,即后缀不是“3.10.0-327.el7.x86_64”的版本,则需要手动卸载和系统版本不相同的版本:

1 [root@localhost ~]# yum remove kernel-3.10.0-1127.13.1.el7.x86_64

安装所需依赖:

1 [root@localhost ~]# yum -y install perl gcc gcc-c++ make cmake kernel kernel-headers kernel-devel net-tools

缺少的包可以下载:

https://buildlogs.centos.org/c7.1511.00/kernel

加载光驱

首先要将Vmware Tools加载到光驱里,点击菜单中的“虚拟机”,选择“安装 VMware Tools(T)...”:

挂载驱动

将加载的光驱挂载到设备目录,通常情况下都是将设备目录“/dev/cdrom”挂载到“/mnt/cdrom”目录。

先创建“/mnt/cdrom”目录:

1 [root@localhost ~]# mkdir /mnt/cdrom

然后进行挂载:

1 [root@localhost ~]# mount /dev/cdrom /mnt/cdrom
2 mount: /dev/sr0 写保护,将以只读方式挂载

拷贝安装包

查看挂载后的目录,并将安装包复制到安装目录:

1 [root@localhost ~]# ll /mnt/cdrom/
2 总用量 55889
3 -r-xr-xr-x. 1 root root     1975 3月  22 2018 manifest.txt
4 -r-xr-xr-x. 1 root root     4393 3月  22 2018 run_upgrader.sh
5 -r--r--r--. 1 root root 55485539 3月  22 2018 VMwareTools-10.2.5-8068393.tar.gz
6 -r-xr-xr-x. 1 root root   843372 3月  22 2018 vmware-tools-upgrader-32
7 -r-xr-xr-x. 1 root root   893640 3月  22 2018 vmware-tools-upgrader-64
8 [root@localhost ~]# cp /mnt/cdrom/VMwareTools-10.2.5-8068393.tar.gz ~

解除挂载

既然已经复制了安装包,那么就可以解除挂载了:

1 [root@localhost ~]# umount /dev/cdrom

安装

解压并安装:

1 [root@localhost ~]# tar -zxvf VMwareTools-10.2.5-8068393.tar.gz
2 ...
3 vmware-tools-distrib/vmware-install.pl
4 [root@localhost ~]# ./vmware-tools-distrib/vmware-install.pl

安装过程如下:

  1 [root@localhost ~]# ./vmware-tools-distrib/vmware-install.pl
  2 open-vm-tools packages are available from the OS vendor and VMware recommends
  3 using open-vm-tools packages. See http://kb.vmware.com/kb/2073803 for more
  4 information.
  5 Do you still want to proceed with this installation? [no]
  6 
  7 INPUT: [no]  default
  8 
  9 [root@localhost ~]# ./vmware-tools-distrib/vmware-install.pl
 10 open-vm-tools packages are available from the OS vendor and VMware recommends
 11 using open-vm-tools packages. See http://kb.vmware.com/kb/2073803 for more
 12 information.
 13 Do you still want to proceed with this installation? [no] yes
 14 
 15 INPUT: [yes]
 16 
 17 Creating a new VMware Tools installer database using the tar4 format.
 18 
 19 Installing VMware Tools.
 20 
 21 In which directory do you want to install the binary files?
 22 [/usr/bin]
 23 
 24 INPUT: [/usr/bin]  default
 25 
 26 What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
 27 [/etc/rc.d]
 28 
 29 INPUT: [/etc/rc.d]  default
 30 
 31 What is the directory that contains the init scripts?
 32 [/etc/rc.d/init.d]
 33 
 34 INPUT: [/etc/rc.d/init.d]  default
 35 
 36 In which directory do you want to install the daemon files?
 37 [/usr/sbin]
 38 
 39 INPUT: [/usr/sbin]  default
 40 
 41 In which directory do you want to install the library files?
 42 [/usr/lib/vmware-tools]
 43 
 44 INPUT: [/usr/lib/vmware-tools]  default
 45 
 46 The path "/usr/lib/vmware-tools" does not exist currently. This program is
 47 going to create it, including needed parent directories. Is this what you want?
 48 [yes]
 49 
 50 INPUT: [yes]  default
 51 
 52 In which directory do you want to install the common agent library files?
 53 [/usr/lib]
 54 
 55 INPUT: [/usr/lib]  default
 56 
 57 In which directory do you want to install the common agent transient files?
 58 [/var/lib]
 59 
 60 INPUT: [/var/lib]  default
 61 
 62 In which directory do you want to install the documentation files?
 63 [/usr/share/doc/vmware-tools]
 64 
 65 INPUT: [/usr/share/doc/vmware-tools]  default
 66 
 67 The path "/usr/share/doc/vmware-tools" does not exist currently. This program
 68 is going to create it, including needed parent directories. Is this what you
 69 want? [yes]
 70 
 71 INPUT: [yes]  default
 72 
 73 The installation of VMware Tools 10.2.5 build-8068393 for Linux completed
 74 successfully. You can decide to remove this software from your system at any
 75 time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".
 76 
 77 Before running VMware Tools for the first time, you need to configure it by
 78 invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
 79 this program to invoke the command for you now? [yes]
 80 
 81 INPUT: [yes]  default
 82 
 83 Initializing...
 84 
 85 
 86 Making sure services for VMware Tools are stopped.
 87 
 88 Stopping Thinprint services in the virtual machine:
 89    Stopping Virtual Printing daemon:                                   done
 90 Stopping vmware-tools (via systemctl):  [  确定  ]
 91 
 92 
 93 The module vmci has already been installed on this system by another installer
 94 or package and will not be modified by this installer.
 95 
 96 The module vsock has already been installed on this system by another installer
 97 or package and will not be modified by this installer.
 98 
 99 The module vmxnet3 has already been installed on this system by another
100 installer or package and will not be modified by this installer.
101 
102 The module pvscsi has already been installed on this system by another
103 installer or package and will not be modified by this installer.
104 
105 The module vmmemctl has already been installed on this system by another
106 installer or package and will not be modified by this installer.
107 
108 The VMware Host-Guest Filesystem allows for shared folders between the host OS
109 and the guest OS in a Fusion or Workstation virtual environment.  Do you wish
110 to enable this feature? [yes]
111 
112 INPUT: [yes]  default
113 
114 
115 Before you can compile modules, you need to have the following installed...
116 
117 make
118 gcc
119 kernel headers of the running kernel
120 
121 
122 Searching for GCC...
123 Detected GCC binary at "/bin/gcc".
124 The path "/bin/gcc" appears to be a valid path to the gcc binary.
125 Would you like to change it? [no]
126 
127 INPUT: [no]  default
128 
129 Searching for a valid kernel header path...
130 Detected the kernel headers at
131 "/lib/modules/3.10.0-327.el7.x86_64/build/include".
132 The path "/lib/modules/3.10.0-327.el7.x86_64/build/include" appears to be a
133 valid path to the 3.10.0-327.el7.x86_64 kernel headers.
134 Would you like to change it? [no]
135 
136 INPUT: [no]  default
137 
138 Using kernel build system.
139 make: 进入目录“/tmp/modconfig-ZhY8Lb/vmhgfs-only”
140 /bin/make -C /lib/modules/3.10.0-327.el7.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
141   MODULEBUILDDIR= modules
142 make[1]: 进入目录“/usr/src/kernels/3.10.0-327.el7.x86_64”
143   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/message.o
144   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/dir.o
145   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/request.o
146   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/filesystem.o
147   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/cpName.o
148   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/rpcout.o
149   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/stubs.o
150   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/hgfsUtil.o
151   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/hgfsEscape.o
152   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/link.o
153   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/transport.o
154   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/module.o
155   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/file.o
156   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/super.o
157   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/bdhandler.o
158   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/fsutil.o
159   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/cpNameLinux.o
160   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/hgfsBd.o
161   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/backdoorGcc64.o
162   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/page.o
163   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/backdoor.o
164   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/inode.o
165   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/dentry.o
166   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/cpNameLite.o
167   CC [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/kernelStubsLinux.o
168   LD [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/vmhgfs.o
169   Building modules, stage 2.
170   MODPOST 1 modules
171   CC      /tmp/modconfig-ZhY8Lb/vmhgfs-only/vmhgfs.mod.o
172   LD [M]  /tmp/modconfig-ZhY8Lb/vmhgfs-only/vmhgfs.ko
173 make[1]: 离开目录“/usr/src/kernels/3.10.0-327.el7.x86_64”
174 /bin/make -C $PWD SRCROOT=$PWD/. \
175   MODULEBUILDDIR= postbuild
176 make[1]: 进入目录“/tmp/modconfig-ZhY8Lb/vmhgfs-only”
177 make[1]: “postbuild”是最新的。
178 make[1]: 离开目录“/tmp/modconfig-ZhY8Lb/vmhgfs-only”
179 cp -f vmhgfs.ko ./../vmhgfs.o
180 make: 离开目录“/tmp/modconfig-ZhY8Lb/vmhgfs-only”
181 
182 The vmxnet driver is no longer supported on kernels 3.3 and greater. Please
183 upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)
184 
185 The vmblock enables dragging or copying files between host and guest in a
186 Fusion or Workstation virtual environment.  Do you wish to enable this feature?
187 [yes]
188 
189 INPUT: [yes]  default
190 
191 NOTICE:  It appears your system does not have the required fuse packages
192 installed.  The VMware blocking filesystem requires the fuse packages and its
193 libraries to function properly.  Please install the fuse or fuse-utils package
194 using your systems package management utility and re-run this script in order
195 to enable the VMware blocking filesystem.
196 
197 VMware automatic kernel modules enables automatic building and installation of
198 VMware kernel modules at boot that are not already present. This feature can
199 be enabled/disabled by re-running vmware-config-tools.pl.
200 
201 Would you like to enable VMware automatic kernel modules?
202 [yes]
203 
204 INPUT: [yes]  default
205 
206 Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed
207 if you want to enable Common Agent (caf). [yes]
208 
209 INPUT: [yes]  default
210 
211 Do you want to enable Common Agent (caf)? [no]
212 
213 INPUT: [no]  default
214 
215 No X install found.
216 
217 Creating a new initrd boot image for the kernel.
218 Generating the key and certificate files.
219 Successfully generated the key and certificate files.
220 manageSELinux install: The 'semanage' utility was not found.
221 There was an error configuring the SELinux security context for VMware Tools.  
222 Please make certain that SELinux is configured correctly.
223 
224 The configuration of VMware Tools 10.2.5 build-8068393 for Linux for this
225 running kernel completed successfully.
226 
227 You must restart your X session before any mouse or graphics changes take
228 effect.
229 
230 To enable advanced X features (e.g., guest resolution fit, drag and drop, and
231 file and text copy/paste), you will need to do one (or more) of the following:
232 1. Manually start /usr/bin/vmware-user
233 2. Log out and log back into your desktop session
234 3. Restart your X session.
235 
236 Enjoy,
237 
238 --the VMware team
239 
240 [root@localhost ~]#
o
粉丝 0
博文 65
码字总数 0
作品 0
私信 提问
加载中
请先登录后再评论。
树莓派(Raspberry Pi):完美的家用服务器

自从树莓派发布后,所有在互联网上的网站为此激动人心的设备提供了很多有趣和具有挑战性的使用方法。虽然这些想法都很棒,但树莓派( RPi )最明显却又是最不吸引人的用处是:创建你的完美家用...

异次元
2013/11/09
7K
8
Javascript图元绘制库--ternlight

基于HTML CANVAS API的Javascript库,提供在HTML页面上绘制图元——如流程图的能力。 目前已支持简单的矩形图元和图元间的连线(直线、直角连线两种),拖拽图元等能力。 该javascript librar...

fancimage1
2013/02/07
6.3K
1
实时分析系统--istatd

istatd是IMVU公司工程师开发的一款优秀的实时分析系统,能够有效地收集,存储和搜索各种分析指标,类似cacti,Graphite,Zabbix等系统。实际上,istatd修改了Graphite的存储后端,重新实现了...

匿名
2013/02/07
3K
1
Java™ 编译器--Janino

Janino是一个超级小但又超级快的Java™ 编译器. 它不仅能像javac工具那样讲一组源文件编译成字节码文件,还可以对一些Java表达式,代码块,类中的文本(class body)或者内存中源文件进行编译,...

匿名
2013/04/02
4.1K
0
图形化的 IDE--LiveCode

LiveCode是一个图形化的IDE,允许用户通过拖放控件并编写代码,来创建桌面或移动应用程序(支持Windows、Mac OS、Linux、iOS和Android平台)。LiveCode受苹果HyperCard的启发,采用一种基于英...

匿名
2013/04/12
7.2K
0

没有更多内容

加载失败,请刷新页面

加载更多

jQuery Ajax调用后如何管理重定向请求 - How to manage a redirect request after a jQuery Ajax call

问题: I'm using $.post() to call a servlet using Ajax and then using the resulting HTML fragment to replace a div element in the user's current page. 我使用$.post()使用Ajax调用......

javail
46分钟前
15
0
没有指定分支的“git push”的默认行为 - Default behavior of “git push” without a branch specified

问题: I use the following command to push to my remote branch: 我使用以下命令推送到我的远程分支: git push origin sandbox If I say 如果我说 git push origin does that push ch......

技术盛宴
今天
21
0
为什么在允许某些Unicode字符的注释中执行Java代码?

问题: The following code produces the output "Hello World!" 以下代码生成输出“Hello World!” (no really, try it). (不,真的,试试吧)。 public static void main(String... args......

富含淀粉
今天
18
0
什么是按位移位(位移)运算符以及它们如何工作? - What are bitwise shift (bit-shift) operators and how do they work?

问题: I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ... 我一直在尝试在业余时间学习......

法国红酒甜
今天
32
0
OSChina 周二乱弹 —— 卧槽 李荣浩的契约兽啊

Osc乱弹歌单(2020)请戳(这里) 【今日歌曲】 @薛定谔的兄弟 :分享洛神有语创建的歌单「我喜欢的音乐」: 《红色的回忆》- 痛仰乐队 手机党少年们想听歌,请使劲儿戳(这里) 动弹, 又好多...

小小编辑
今天
89
1

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部