zoukankan      html  css  js  c++  java
  • win10 虚拟机VMware 14中CentOS7文件共享

    一,环境

    主机:win10 家庭版

    软件:VMware 14

    系统:CentOS 7

     二,设置共享文件

    右键虚拟机->选择设置

     如图:创建共享文件

    三,安装VMware Tools

    然后进入centOS系统

    新建一个目录 /mnt/cdrom, 用于挂载虚拟光驱

    mkdir /mnt/cdrom

    将虚拟光驱设备 /dev/cdrom挂载到目录 /mnt/cdrom

    mount /dev/cdrom /mnt/cdrom

    进入到/tmp目录下将挂载在虚拟光驱中的目录的 /mnt/cdrom 中的 VMwareTools-10.2.5-8068393.tar.gz  把文件解压到/tmp

    #解压文件
    tar zxpf /mnt/cdrom/VMwareTools-10.2.5-8068393.tar.gz 
    #进入vmware-tools-distrib 目录下
    cd /cdrom/vmware-tools-distrib 
    #运行vmware-install.pl文件
    ./vmware-install.pl

    注意:

      The path "" is not valid path to the gcc binary.
      Would you like to change it? [yes] no
      输入 no

    安装后/mnt中有hgfs但没共享文件的方法

     cd /mnt/hgfs/

    vmware-hgfsclient 命令查看当前共享的目录(注意share该目录大家可能不一样,后面的命令中多次用到

    [root@localhost hgfs]# vmware-hgfsclient
    share

    使用 mount  -t vmhgfs .host:/share /mnt/hgfs  命令挂载该共享文件夹(注意:带.号的哦),其中.host:/Documents是共享名,只需把Documents换成
    使用vmware-hgfsclient 命令得到的目录,/mnt/hgfs是挂载点

    mount  -t vmhgfs .host:/share /mnt/hgfs

    没报错则成功,如果报错如:

    [root@localhost hgfs]# mount -t vmhgfs .host:/share /mnt/hgfs
    Error: cannot mount filesystem: No such device

    vmhgfs-fuse,需要安装工具包

    [root@localhost hgfs]# yum install open-vm-tools-devel -y
    [root@localhost hgfs]# vmhgfs-fuse .host:/share /mnt/hgfs

    设置自动挂载

    每次进入系统都得mount如果你觉得麻烦的话,你就vim /etc/fstab,然后再最后添加 

     .host:/share    /mnt/hgfs       vmhgfs     defaults  0  0

    笔者虚机重启之后(welcome to emergency mode!)就不行了最后修改为

    参考:https://www.linuxidc.com/Linux/2017-08/146347.htm

    .host:/share     /mnt/hgfs       fuse.vmhgfs-fuse allow_other,defaults   0  0

    到此成功截图为证

  • 相关阅读:
    jmeter压测-05-xpath表达式
    测试那些事-测试资源篇
    测试那些事-沟通篇
    测试那些事-前端
    测试那些事儿-后端
    记一次大数据量不同处理方式下服务器负载
    jmeter压测dubbo接口,参数为dto时如何写传参及有错误时的分析思路
    pyton3 字典排序
    python测试dubbo接口
    记录一下telnet测试dubbo接口,参数为dto时怎么测试,枚举类型传参
  • 原文地址:https://www.cnblogs.com/brokencolor/p/11614025.html
Copyright © 2011-2022 走看看