Home  >  Article  >  System Tutorial  >  Mount NFS shared file system on Windows

Mount NFS shared file system on Windows

王林
王林forward
2024-01-01 17:05:241530browse
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.
lab environment
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
NFS Host Operation
# 使用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

Windows Server 2008 R2 Operation

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:
Mount NFS shared file system on Windows

Mount NFS shared file system on Windows

Mount NFS shared file system on Windows

After the installation is completed, you need to type the "Win r" key at the same time to open cmd
Mount NFS shared file system on Windows
# 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:
Mount NFS shared file system on Windows

Open the computer and find that it has been mounted successfully
Mount NFS shared file system on Windows

If you want to automatically mount it after booting, you can click "Computer" → click "Map Network Drive" → "Enter the network shared file path" → "Complete"
Mount NFS shared file system on Windows

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!

Statement:
This article is reproduced at:linuxprobe.com. If there is any infringement, please contact admin@php.cn delete