修改权限:
chmod 777 -R
/opt/FriendlyARM/mini2440/root_qtopia/
2)安装NFS
sudo apt-get install nfs-kernel-server (apt同时也安装了nfs-common portmap)
3)配置nfs
a. sudo gedit /etc/default/portmap
将末行“-i 127.0.0.1”去掉-i 127.0.0.1为“”。
b. sudo dpkg-reconfigure portmap
对should portmap be bound to the loopback address?
选N
c. 配置/etc/hosts.deny
sudo gedit /etc/hosts.deny(禁止任何主机host与你的nfs服务器进行nfs链接)
末行添加:
###NFS DAEMONS
ALL:ALL
配置/etc/hosts.allow
sudo gedit /etc/hosts.allow
文末添加:
###NFS DAEMONS
portmap:192.168.0.
lockd:192.168.0.
mountd:192.168.0.
rquotad:192.168.0.
statd:192.168.0.
nfsd:192.168.0.
$ sudo /etc/init.d/portmap restart 重启portmap daemon.
显示如下
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the restart(8) utility, e.g. restart portmap
portmap start/running, process XXXX
$ sudo showmount -e
显示 clnt-create : RPC : Program not registered
$ sudo exportfs -r 更新
$ sudo showmount 192.168.0.2 -e
显示
Export list for 192.168.0.2:
/opt/FriendlyARM/mini2440/root_qtopia/
*
六 启用
$ sudo /etc/init.d/nfs-kernel-server restart 重启nfs服务
显示如下
* Stopping NFS kernel daemon [ OK ]
* Unexporting directories for NFS kernel daemon... [ OK ]
* Exporting directories for NFS kernel daemon...
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "*:/opt/FriendlyARM/mini2440/root_qtopia/
".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
* Starting NFS kernel daemon [ OK ]
挂载
mount -t nfs 192.168.0.2:/opt/FriendlyARM/mini2440/root_qtopia/ /nfsmnt
mount -t nfs 192.168.0.2:/opt/FriendlyARM/mini2440/root_qtopia/ /nfsmnt -o nolock
虽然还不知道能不能在开发板上用,今天终于初见端倪,在主文件夹下/nfsmnt找到了想要的内容!!
明天就是教师节啦,祝老师们节日快乐!
2011年的中秋节前夕写一篇博文,以勉励 吾辈。中秋快乐!