centos6.5安装vmware tools&共享文件夹显示

Posted yangjiming

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos6.5安装vmware tools&共享文件夹显示相关的知识,希望对你有一定的参考价值。

1. 点击VM中“虚拟机(M)”->“设置”,将cd/dvd使用iso镜像文件清空技术分享图片

2. 创建挂载目录

 1 mkdir /media/cdrom
 2 mount /dev/cdrom  /media/cdrom
 3 
 4 安装虚拟机出现以下提示:
 5 mount:block device /dev/sr0 is write - protected , mounting read-only
 6 说明系统光驱加载成功,因为光驱是只读的,所以提示write-protected,mounting read-only,sr0是光驱设备名,
 7 通过以下命令:ll /dev/cdrom  
 8 看到
 9 lrwxrwxrwx. 1 root root 3 Dec 25  2013 /dev/cdrom -> sr0
10 即/dev/cdcom是sr0的软链接
11 
12 改成
13 mount -o remount,rw /dev/sr0 /media

3. 拷贝解压,进入解压目录,执行,一路回车默认配置。

cd  media/
1 cp VMwareTools-9.6.2-1688356.tar.gz /root
2 
3 cd /root
4 tar -xzvf VMwareTools-9.6.2-1688356.tar.gz
5 
6 cd vmware-tools-distrib/
7 ./vmware-install.pl

4. windows主机上设置共享文件夹,在centos上对应是/mnt/hgfs/共享文件夹目录下技术分享图片

 5. centos配置信息

1 用 vmware-hgfsclient 命令可以看到你的共享文件夹目录
2 使用 mount  -t vmhgfs .host:/shareFolder /mnt/hgfs  命令挂载该共享文件夹。其中.host:/Documents是共享名,只需把Documents换成使用vmware-hgfsclient 命令得到的目录,/mnt/hgfs是挂载点
3 设置成开机挂载,用vi编缉/etc/fstab中的内容,在最下面增加一行内容为:
4 .host:/shareFolder     /mnt/hgfs       vmhgfs     defaults  0  0

 问题解决

(1)Unable to find the binary installation directory,删除一个文件即可。

 1 A previous installation of VMware Tools has been detected.
 2 
 3 The previous installation was made by the tar installer (version 4).
 4 
 5 Keeping the tar4 installer database format.
 6 
 7 You have a version of VMware Tools installed. Continuing this install will
 8 first uninstall the currently installed version. Do you wish to continue?
 9 (yes/no) [yes]
10 如果选择是,将会显示以下错误消息:
11 
12 Error: Unable to find the binary installation directory (answer BINDIR)
13 in the installer database file "/etc/vmware-tools/locations".
14 
15 Uninstall failed. Please correct the failure and re run the install.
16 
17 Execution aborted.
1 rm -f /etc/vmware-tools/locations

(2)initctl: Job failed to start 

 1 Do you want to enable Guest Authentication (vgauth)? [yes] 
 2 
 3 No X install found.
 4 
 5 Creating a new initrd boot image for the kernel.
 6 vmware-tools-thinprint start/running
 7 initctl: Job failed to start 
 8 Unable to start services for VMware Tools
 9 
10 Execution aborted.
1 移除文件
2 rm /etc/init/vmware-tools-thinprint.conf
3 重启服务
4 /etc/vmware-tools/services.sh start 

 

以上是关于centos6.5安装vmware tools&共享文件夹显示的主要内容,如果未能解决你的问题,请参考以下文章

centos 6.5安装VMware tools

wmware下linux安装vmware tools步骤

在 Linux 虚拟机中手动安装或升级 VMware Tools

VMware10+CentOS6.5+MySQL5.6.35

VMware下安装CentOS6.5

vmware安装centos6.5以及初始化