MS Windows:挂载Linux NFS
如题所示,本文将在MS Windows中挂载一个来自Linux的NFS。
环境如下:
Linux:
192.168.232.151
MS Windows:
192.168.232.176
Linux,配置NFS(RHEL6):
0. mkdir /nfs_me ; vi /etc/exports
1 2 3 4 5 |
[root@ns ~]# mkdir /nfs_me [root@ns ~]# [root@ns ~]# cat /etc/exports /nfs_me 192.168.232.0/24(rw) [root@ns ~]# |
1. yum groupinstall “NFS file server”
2. service rpcbind start
3. service nfs start
1 2 3 4 5 6 7 8 9 10 |
[root@ns ~]# service rpcbind start Starting rpcbind: [ OK ] [root@ns ~]# [root@ns ~]# service nfs start Starting NFS services: [ OK ] Starting NFS quotas: [ OK ] Starting NFS mountd: [ OK ] Starting NFS daemon: [ OK ] Starting RPC idmapd: [ OK ] [root@ns ~]# |
4. showmount -e
1 2 3 4 |
[root@ns ~]# showmount -e Export list for ns.d-prototype.com: /nfs_me 192.168.232.0/24 [root@ns ~]# |
这样NFS服务端就配好了。
MS Windows:
安装网络文件服务:
MS Windows,执行挂载:
命令:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
Microsoft Windows [版本 6.1.7601] 版权所有 (c) 2009 Microsoft Corporation。保留所有权利。 C:\Users\Administrator>ping -n 2 192.168.232.151 正在 Ping 192.168.232.151 具有 32 字节的数据: 来自 192.168.232.151 的回复: 字节=32 时间<1ms TTL=64 来自 192.168.232.151 的回复: 字节=32 时间<1ms TTL=64 192.168.232.151 的 Ping 统计信息: 数据包: 已发送 = 2,已接收 = 2,丢失 = 0 (0% 丢失), 往返行程的估计时间(以毫秒为单位): 最短 = 0ms,最长 = 0ms,平均 = 0ms C:\Users\Administrator> C:\Users\Administrator>mount 192.168.232.151:/nfs_me n: n: 现已成功连接到 192.168.232.151:/nfs_me 命令已成功完成。 C:\Users\Administrator> |
需要注意的是:
1. 如上操作最好在cmd中执行,而不是PowerShell中执行。
2. 操作时,命令行会话最好具有管理员权限。
尝试通过MS Windows向NFS传输一个东西:
这里,需要注意NFS目录的权限,当前是:
1 2 3 |
[root@ns ~]# ls -ldtr /nfs_me/ drwxr-xr-x 2 root root 4096 Jul 30 18:02 /nfs_me/ [root@ns ~]# |
这也是默认情况。
在这个权限下,MSWIN是无法向NFS中传递任何文件的:
将NFS目录的other的权限改为可写,就可以传输了:
Linux:
1 2 3 4 |
[root@ns ~]# chmod 777 /nfs_me/ [root@ns ~]# ls -ldtr /nfs_me/ drwxrwxrwx 2 root root 4096 Jul 30 18:02 /nfs_me/ [root@ns ~]# |
MS Windows:
传输完成后,看看Linux中,目录的状态:
1 2 3 4 5 6 7 |
[root@ns ~]# ls -ltr /nfs_me/ total 76864 -rwxr-xr-x 1 4294967294 4294967294 78706712 Aug 24 2015 snagit.exe [root@ns ~]# [root@ns ~]# du -sh /nfs_me/* 76M /nfs_me/snagit.exe [root@ns ~]# |
MS Windows,卸载NFS:
命令:
1 2 3 4 5 6 |
C:\Users\Administrator>umount n: 正在断开 n: \\192.168.232.151\nfs_me 命令已成功完成。 C:\Users\Administrator> |
————————————————————————
Done。
大胆人体
王祖贤性感图片妹妹恋人漫画下载街拍美女网妻子的诱惑全集下载薄荷的诱惑人人碰在线av视频赤裸的诱惑hTTp://T.cN/R6G5o5H