在项目中遇到这样的问题:linux下开启了NFS服务,那么在windows下能不能挂到呢?
我们知道windows在默认情况下是不支持NFS文件格式的,那么如何做呢?
我找到了 Microsoft Windows Services for UNIX 3.5, 大家可不要被此软件前边的Microsoft吓到了,以为这是微软出的,要收版权费的。大家可以放心使用:一下是此软件的版权声明中的节选:
The version of awk included with Services for UNIX 3.5 is derived
from AT&T source code.
Copyright (c) AT&T 1993
All Rights Reserved.
Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and
that both that the copyright notice and this permission notice
and warranty disclaimer appear in supporting documentation, and
that the name of AT&T or any of its entities not be used in
advertising or publicity pertaining to distribution of the software
without specific, written prior permission.
看到了吧, 其实这是AT&T的东东,放心好了。
下载地址: Microsoft Windows Services for UNIX 3.5
那么这东东怎么用呢?
下载后,解压缩到C:/ SFU35SEL_EN
然后可以安装了,如果想完全安装可以点击SFU35SEL_EN内的setup.exe. 如果只想安装 Client for NFS on Windows,可以按照下边的CMD指令进行安装:msiexec /I C:/SFU35SEL_EN/sfusetup.msi /qb addlocal="NFSClient"
我只安装了 Client for NFS on Windows, 安装后在所有程序中可见
Windows Services for UNIX -> Help for Services for UNIX
Readme
Services for UNIX Administrator
Telnet Client
在C盘内创建文件夹SFU: C:/SFU
安装完成后打开Services for UNIX Administrator
* 设定User Name Mapping
在Configuration选项卡中选择User Password and Group files
把要挂载的系统的文件夹中的/etc/passwd, /etc/group文件拷贝到C:
导入到Configuration中
* 设定Maps
在Advanced maps中选择 Show User Maps
点击List Windows User , List UNIX User(因为我们已经把passwd和group文件导入进来了)
在List中选择Windows和UNIX下的用户名。点击Add.
OK了, 之后我们就可以mount了。
打开CMD,敲入之下的指令: cd C:/SFU/common
mount UNIX_ip:/path drive_id: (例如mount 192.168.0.1:/home/allen f:)
这样就可以挂载,挂载成功会显示
C:/SFU/common>mount 10.88.100.159:/usr/work e:
e: is now successfully connected to 10.88.100.159:/usr/work
The command completed successfully.
这样就成功的在windows文件夹下挂载了NFS文件系统。
注意:那么我们如何知道UNIX环境下NFS的共享文件夹呢?很简单,之需要调用一下more /etc/export就可以知道了
参考资料:http://cha.homeip/blog/archives/2005/11/_windows_unix_n.html
更多推荐
windows XP挂载NFS
发布评论