5分钟搞定 开发板连接主机----建立NFS服务的指令记录

--指定输出目录

#vi /etc/exports
写入:/opt/code 192.168.1.*(rw,sync,no_root_squash) 


--关闭防火墙并查看状态:
#service iptables stop
#service iptables status
或者
/etc/init.d/iptables stop
/etc/init.d/iptables status


--首先要查看portmap服务是否运行
FEDORA是:
# service rpcbind start
# service rpcbind restart

[root@51arm ~]# service rpcbind start
[root@51arm ~]# service rpcbind status
rpcbind (pid 1111) is running...

--启动NFS
 /etc/rc.d/init.d/nfs start

或者
# service nfs start

--查看NFS状态
客户段的操作:
  1、showmout命令对于NFS的操作和查错有很大的帮助,所以我们先来看一下showmount的用法
  showmout
  -a :这个参数是一般在NFS SERVER上使用,是用来显示已经mount上本机nfs目录的cline机器。
  -e :显示指定的NFS SERVER上export出来的目录。
   例如:
   showmount -e 192.168.0.30

--开发板上操作:

#ping 192.168.1.101 -c3
# mount -t nfs -o nolock 192.168.1.101:/opt/code  /mnt

#

一切顺利。

 

利尔达物联网研发中心

zxyu

2011-5-14

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章