VMware下centos7安装VMware Tools 转载

VMware下centos7安装VMware Tools

右键虚拟机设置,找到CD/DVD,选择使用ISO映像文件,在VMware安装目录下找到linux.iso。
 
挂载iso文件
1
> mount -t auto /dev/cdrom /mnt/cdrom
如果/mnt下没有cdrom文件夹,则创建
1
2
> cd /mnt
> mkdir cdrom
把/mnt/cdrom下的VMwareTools-10.0.10-4301679.tar.gz拷贝到/data目录下
1
2
> cd /mnt/cdrom
> cp VMwareTools-10.0.10-4301679.tar.gz /data
解压压缩包并执行vmware-install.pl
1
2
3
> tar -zxvf VMwareTools-10.0.10-4301679.tar.gz
> cd vmware-tools-distrib
> ./vmware-install.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Do you still want to proceed with this legacy installer? yes
 
看到如下信息一路回车默认就好了
 
Installing VMware Tools.
 
In which directory do you want to install the binary files?
[/usr/bin]
 
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc/rc.d]
 
What is the directory that contains the init scripts?
[/etc/rc.d/init.d]
 
In which directory do you want to install the daemon files?
[/usr/sbin]
 
In which directory do you want to install the library files?
[/usr/lib/vmware-tools]

如果一直提示如下信息

What is the location of the "ifconfig" program on your machine?

请安装ifconfig,重新执行vmware-install.pl

1
2
> yum search ifconfig
> yum install net-tools.x86_64

如果一直提示如下信息

The path "" is not a valid path to the 3.10.0-327.el7.x86_64 kernel headers.
Would you like to change it?

则需要安装

1
> yum install kernel-devel

然后在上面的步骤里输入内核头文件的目录

1
/usr/src/kernels/3.10.0-327.36.3.el7.x86_64/ include

如果出现如下信息

The path "/usr/src/kernels/3.10.0-327.36.3.el7.x86_64/include" is not a valid
path to the 3.10.0-327.el7.x86_64 kernel headers

1
2
> ln -s /usr/src/kernels/3.10.0-327.36.3.el7.x86_64/ include /generated/uapi/linux/version.h
/usr/src/kernels/3.10.0-327.36.3.el7.x86_64/ include /linux/version.h

此时如果你的vmtools版本比较旧的话,还是会提示not a valid path。

这是因为3.x版本的内核version.h的路径变了,导致vmtools无法找到。

一路默认回车就好了,最后出现如下信息,说明安装成功,重启虚拟机。
1
2
3
Enjoy,
--the VMware team
Found VMware Tools CDROM mounted at /mnt/cdrom. Ejecting device /dev/sr0 ...
1
2
> umount /mnt/cdrom
> shutdown -r now

你可能感兴趣的:(VMware下centos7安装VMware Tools 转载)