Home>Article>Operation and Maintenance> Deploy CentOs7 shared directory in Vmware
The main content of this article is to tell you how to deploy CentOs7 shared directory in Vmware. It has certain learning value and interested friends can learn about it.
First download the images of VMware and CentOs7
To install VMware, I refer to https://www.cnblogs.com/wuyx/p/7246675.html, which is very detailed
Then you need to configure the network. Reference
https://www.linuxidc.com/Linux/2017-07/145845.htm
https://www.cnblogs.com/ CoolJayson/p/8017049.html
https://www.cnblogs.com/loeng/p/6540104.html
The third step is to build the lnmp environment https://lnmp.org/
Set up shared directory Reference: https://blog.csdn.net/joson_yuan/article/details/71805269?utm_source=itdadao&utm_medium=referral
https://blog.csdn.net/ qq_19004627/article/details/78689641
1. Install VMWare tools (The location of the compressed package is inside the VMware compressed package. My package name is VMwareTools-10.2.5-8068393.tar and then upload this file to the server Decompress and install)
2. Set the shared directory in the virtual machine
Use the mount -t vmhgfs .host:/shared /mnt/hgfs command to mount the shared folder (note: with . number), where .host:/Documents is the share name, just replace Documents with
The directory obtained by using the vmware-hgfsclient command, /mnt/hgfs is the mount point
is set to Automatically mount after random startup
Edit /etc/fstab and add the following line
.host:/shared /mnt/hgfs vmhgfs defaults 0 0 (write on demand)
where host:/share The share in is the share name. You can use the command: vmware-hgfsclient to view
VMware’s default share path is in/mnt/hgfs
, which is hard-coded in the script of VMware Tools , we can find it from/etc/init.d/vmware-tools
:
vmhgfs_mnt="/mnt/hgfs" #Mount all hgfs filesystems" vmware_mount_vmhgfs() { if [ "`is_vmhgfs_mounted`" = "no" ]; then if [ "`vmware_vmhgfs_use_fuse`" = "yes" ]; then mkdir -p $vmhgfs_mnt vmware_exec_selinux "$vmdb_answer_BINDIR/vmhgfs-fuse \ -o subtype=vmhgfs-fuse,allow_other $vmhgfs_mnt" else vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt" fi fi }
For more tutorials, please followPHP Chinese website!
The above is the detailed content of Deploy CentOs7 shared directory in Vmware. For more information, please follow other related articles on the PHP Chinese website!