vm 将宿主机文件夹 映射至 虚拟机
发布时间:2020-12-15 05:28:30 所属栏目:Java 来源:网络整理
导读:一、关于centos如何安装(自行百度) 二、设置共享文件夹 添加共享文件夹 虚拟机-设置-选项-共享文件夹 三、安装vm-tools (请用root用户执行) 3.1 安装vm-tools yum install open-vm-tools open-vm-tools-desktop 3.2 挂载 # 1 查看共享的目录vmware-hgfsclien
一、关于centos如何安装(自行百度)二、设置共享文件夹
虚拟机->设置->选项->共享文件夹 三、安装vm-tools (请用root用户执行)
yum install open-vm-tools open-vm-tools-desktop
# 1 查看共享的目录 vmware-hgfsclient # www # 2 创建hgfs mkdir -p /mnt/hgfs # 3 用vmhgfs-fuse命令挂载目录 vmhgfs-fuse .host:/ /mnt/hgfs # 4 此刻 www 目录即 真正挂载到 虚拟机上了 ls /mnt/hgfs # www
# 1 执行命令 mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other # 2 添加数据 vim /etc/fstab # 在末尾另起一行 添加下面一行 .host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0 # 3 重新挂载 vmhgfs-fuse .host:/ /mnt/hgfs 四、软连接至/home 目录下ln -s /mnt/hgfs/www /home/www (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |