Windows下NFS服务器SFU设置

 http://blog.chinaunix.net/u1/43045/showart_411683.html
一、安装SFU

1、下载软件SFU

http://download.microsoft.com/download/a/1/c/a1ca7af1-a6e3-46e7-874a-4c5d8c0fb3b7/SFU35SEL_EN.exe

2、编辑用户组group文 件 和密码passwd文件 ,并复制到C:\

       例如:

passwd内容

root:x:0:0:root:/root:/bin/sh

group内容

root:x:0:

3、运行SFU35BETA_EN.exe, 这是一个自解压文件,指定一个目录,释放压缩的文件。

4、在释放目录中,运行SfuSetup.msi,出现Micorsoft Windows Services for UNIX Setup wizard窗口。

5、点击Next,出现Customer Information窗口。

6、点击Next,出现License and Support Information窗口,选中“I accept the agreement”

7、点击Next,出现Installation Options窗口。

8、选择Custom Installation,点击Next,出现Selecting Components窗口。

9、点击Utilities目录项,选择Entire feature will not be available,该项的图标变为一个棕色的叉号。

10、对“Interix GNU components”“Remote Connectivity”使用相同的选择。

11、点击NFS目录项,选择Entire Feature (including all subfeature if any) will be installed on local hard drive,该项的图标变为一个白色背景的驱动器。

12、对“Authentication tools for NFS”使用相同的选择, 选择Entire Feature (including all subfeature if any) will be installed on local hard drive

13、最终只有“Authentication tools for NFS”“NFS”两项是完全安装,其他各 项都不安装。

14、点击Next,出现User Name Mapping窗口,选中Password and group files

15、点击Next,在Password file path and name下的空白栏中输入C:\passwd,在Group file path and name下的空白栏中输入C:\group

16、点击Next,出现Installationg Location窗口,选择安装位置。这里的安装位置的盘必须是NTFS格式

17、点击Next,开始安装(约21MB)。最后选择Finish,结束安装。如提示重启,则重启。 (以上安装过程比较简单,引用网络上文 章。)

注:与卡巴斯基互联网套装6.0有冲突,需安装之前关闭卡巴斯基。


二、共享Windows主机目录

1、  不需重启,对要共享的目录,右键点击出现下拉菜单,选择属性,出现目录属性窗口。如图1

1

2、  选择“NFS Sharing”选项卡, 选中share this folder;指定共享名(Share name,一个简单的名字,大小写无关,如dir); 字符编码(Encoding)选择GB2312-80;选中Allow anonymous access;点击Permissions,出现NFS Share Permissions窗口,设置共享文件夹读写属性。如图2

2

3、  Type of access下拉菜单中选择Read-Write(可读可写);要使目标板对本机文件有root权限,选中Allow root access

4、  设置完,点击OK按钮,回到目录属性窗口。

5、  点击安全选项,添加everyone,使之允许读取,控制,或者完全控制

三、配置Services for UNIX Administration

1、选择开始->程序->Windows Services for Unix->Services for Unix Administration启动Services for UNIX Administration

2、出现设置窗口后,点击左边子窗口User Name Mapping,再点击标签栏“Map”,然后点击 show User Maps,出现如下画面:

点击service for NFS,如下设置:

点击locking,如下设置:

点击Client Group,如下设置:

点击Server Settings,如下设置:

点击User Name Mapping,,如下设置:

点击Maps,出现如下画面:

点击Show User Maps, 如下设置,然后返回:

点击工具——>文件夹选项——>查看,去掉“使用简单的文件共享 前”的勾,然后确定,如下:

至此设置完毕

四、启动目标板,并在目标板上挂装Windows目录

将主机IP设为192.168.1.1,交叉线与目标板相连,启动目标板,主机启动tftp服务,运行mount命令来挂装NFS目录:

      mount –t nfs –o nolock 192.168.1.1: share_name /mnt

share_name为共享的目录名。显示一下目录内容,应为Windows机器上的共享NFS目录内容。

这样,我们编译好的程序便可以放入共 享目录中,然后在目标板上运行。

例如:windows主机192.168.1.7 NFS共享了一个work目录,ARMIP192.168.1.9

二者通过交叉线连接,ARM板操作如下:

[root@(none) /]$

[root@(none) /]$mount -t nfs -o nolock 192.168.1.7:work /mnt/nfs/

[root@(none) /]$cd /mnt/nfs/

[root@(none) nfs]$ls

gpsdata  ll       test

[root@(none) nfs]$./gpsdata

handle

Reading data from robot.

 

[root@(none) nfs]$

 

以上成功挂载了windows共享的work目录,并运行了gpsdata程序

你可能感兴趣的:(Windows下NFS服务器SFU设置)