Introduction | As we all know, nfs and smb are file sharing protocols on Linux servers. SMB uses the samba protocol and Windows file sharing uses a protocol. In other words, smb is a cross-platform file sharing protocol. NFS personally thinks it is a file sharing protocol for Linux systems or uinx-like systems. I recently saw an online blog post and discovered that Windows systems can also mount nfs systems, so I couldn’t help but share it with everyone. |
Host | operating system | IP address | Software package |
NFS Host | Centos7.2 | 192.168.190.128 | nfs-utils、rpcbind |
Windows Client | Windows server 2008 | 192.168.190.129 | Network File System |
# 使用yum安装nfs-utils和管理工具rpcbind [root@bogon ~]# yum -y install nfs-utilsrpcbind # 建立共享文件夹 [root@bogon ~]# mkdir /nfs [root@bogon ~]# vim /etc/exports # nfs是共享的目录名,*是指所有主机,rw是指读写权限,如果需要只读可以改为ro /nfs *(rw)
# Note: Set access permissions for the files that need to be shared, because nfs will map all access users to the nobody user by default, but the user we just created does not have access permissions for the files that need to be shared, so it is set to full access here. , if you need to use it on the public network, you need to set the permissions to be used in the production environment
[root@bogon ~]# chmod 777 /nfs [root@bogon ~]# systemctl start nfs.service [root@bogon ~]# systemctl startrpcbind.service
Open the "Control Panel" → click "Role" → click "Add Role" → click "Next" → click "File Services" → click "Next" → click "Next" → select "Network File System" Service" → Click "Next" → Click "Install", as shown in the figure below:
After the installation is completed, you need to type the "Win r" key at the same time to open cmd
# Note: 192.168.190.128 is the address of the nfs server, /nfs is the shared directory of the server, and X is the mount point of nfs in windows
Input: mount 192.168.190.128:/nfs X:
Open the computer and find that it has been mounted successfully
If you want to automatically mount it after booting, you can click "Computer" → click "Map Network Drive" → "Enter the network shared file path" → "Complete"
The above is the detailed content of Mount NFS shared file system on Windows. For more information, please follow other related articles on the PHP Chinese website!