VMware——在CentOS中安装VMware Tools

摘要:
VMware-在CentOS中安装VMware工具摘要:本文主要介绍如何在VMware中的CentOS中安装VMwareTools。首先创建“/mnt/cdrom”目录:1[root@localhost~]#然后装载mkdir/mnt/cdrom:1[root@localhost~]#装载/dev/cdrom/mnt/cdrom2mount:/dev/sr0受写保护。它将以只读模式装载和复制安装包。查看装载的目录并将安装包复制到安装目录:1[root@localhost~]#Ll/mnt/cdrom/2总剂量558893-r-xr-xr-x。1根根19753-222018manifest4-r-xr-xr-x。1 rootroot43932013-222018run_升级程序。sh5-r-r-r--。1根55485539 2018年3月22日VMwareTools-10.2.5-8068393.tar.gz6-r-xr-xr-x。1根843372 2018年3月22日vmware-to-ools-upgrader-327-r-xr-xr-x。1根8936403月222018vmware-tools-upgrader-648[root@localhost~]#Cp/mnt/cdrom/VMwareTools-10.2.5-8068393.tar。gz~卸载现在安装包已经复制,您可以卸载它:1[root@localhost~]#解压缩并安装umount/dev/cdrom安装:1[root@localhost~]#tar-zxvfVMwareTools-10.2.5-8068393.tar.gz2…3vmware工具发行版/vmware安装。第4页[root@localhost ~]#./vmware工具发行版/vmware安装。pl安装过程如下:1[root@localhost~]#./vmware tools distrib/vmware-install.pl2open-vm-to-olspages可从OS供应商和VMwarerecommenders使用open-vm-toolspages3获得。Seehttp://kb.vmware.com/kb/2073803formore4information.5Doyoustillwanttoproceedwiththisinstallation?
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 ~]#

免责声明:文章转载自《VMware——在CentOS中安装VMware Tools》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇Centos防火墙设置与端口开放的方法Java笔记(十五) 并发包下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

一步步实现滑动验证码(拼图验证码),Java图片处理关键代码

最近滑动验证码在很多网站逐步流行起来,一方面对用户体验来说,比较新颖,操作简单,另一方面相对图形验证码来说,安全性并没有很大的降低。当然到目前为止,没有绝对的安全验证,只是不断增加攻击者的绕过成本。 接下来分析下滑动验证码的核心流程: 后端随机生成抠图和带有抠图阴影的背景图片,后台保存随机抠图位置坐标 前端实现滑动交互,将抠图拼在抠图阴影之上,获取到用户...

Linux后台执行脚本 &与nohup

Linux后台执行脚本的方式: 0、脚本代码 [root@VM_1_3_centos apps]# cat test.php <?php sleep(5); echo "hello world! "; 1、& 符号当在前台运行某个作业时,终端被该作业占据;可以在命令后面加上& 实现后台运行。示例1、 [root@VM_1_3_c...

centos 配置vlan

centos 配置vlan https://access.redhat.com/documentation/zh-cn/red_hat_enterprise_linux/7/html/networking_guide/sec-configure_802_1q_vlan_tagging_using_the_command_line 在 Red Hat Ent...

Linux服务器宕机案例第二则

    邮件告警发现海外工厂一Linux服务器连接不上,DPA(Database Performance Analyzer)系统也发现其出现问题,ping这台服务器发现网络不通,联系不到当地系统管理员,邮件咨询后,这个系统管理员也发现有问题,直接重启了,事后检查发现日志message里面,从10:10分开始出现下面错误信息(敏感信息处理了) Jul  7...

CentOS 7 64位

1.查看Ip: ip addr 以前记得使用的是 ifconfig       这里提示没有发现命令      使用 ip addr 出现了上边的结果。系统刚刚在虚拟机中装好,所以显示的是上边的结果。但是出现了ip: 127.0.0.1 2.修改ip配置,联网 vi /etc/sysconfig/network-scripts/ifcfg-e...

CentOS上安装比较习惯的代码编辑器

linux下的vim用起来不是很习惯,可能是能力有限。所以一直在找一种自己比较熟悉的代码编辑器,所以就找到了sublime text,安装方法网上有很多种,比较方便的方法:直接在csdn上下载一个破解版的,链接为: http://download.csdn.net/download/phpscott2/5356561 安装后,能够运行,但每次打开都提示没有...