Win7 除了旗舰版和企业版其他版本没有NFS客户端,windows2000,windowsXP,windows2003有个sfu(windows services for unix) 工具貌似比较强大,由于一直用win7而且这个软件不支持win7所以不做描述。win7自带客户端的详细使用方法在这里。公司里的电脑用的专业版,只能用windows作为服务端了,用这个软件就能满足我的要求,结尾有下载地址
注意:那个重启服务器 的按钮是假的,反正我修改配置之后重启不生效让我费了很多时间,重启所有服务exports配置才会生效,按钮是这个。
在客户端使用PHP的时候要注意,任何php文件函数写入的字节数最大在2700和2800之间,超过这个数值根本不会写入任何文件,追踪这个错误花了我一些时间,我客户端是centos6.2 php5.3.3,试遍了所有办法都不行,先写入一些字节关闭文件指针,然后fopen()使用a模式写入都不行。我的挂载方式是这样的:
mount -o soft,timeo=1,rsize=32768,wsize=32768 10.9.10.39:/wwwroot /work2/xiep/wwwroot/ 配置文件的格式比较特殊,具体查看自带的帮助文件这里是帮助文件的一些选项
The following options are supported:
-name:<sharename> assigns a name to the exported path as an alternate name for mounting.
-alldirs allows the host(s) to mount at any point within the filesystem.
-umask:<mask> set the umask for group and world permissions on the filesystem, default 022
-readonly limits access to reading
-public Enables Web<a href="http://www.seaomc.com/archives/tag/nfs" title="查看更多关于NFS的文章" target="_blank">NFS</a> access.
-lowercase maps all file names to lowercase, otherwise case is preserved.
-mapall:&amp;lt;uid&amp;gt;[:&amp;lt;gid&amp;gt;] all Unix user-ids and group-ids are mapped to the specified user-id and group-id.
-maproot:&amp;lt;uid&amp;gt;[:&amp;lt;gid&amp;gt;] the Unix super user root is mapped to the specified user-id, group-id. Without a mapping entry root will be mapped to user and group nobody.
-range IP adresses are interpreted in pairs as from-to ranges enabling client access from all addresses in a range (more flexible than the unix -net -mask options).
hanewin_nfs_server_V1.1.69.zip
Win7 NFS 设置详解
本地测试搭建(山寨)CF服务器可以服务器上搭建 含数据库