Fedora下nfs服务器搭建

Fedora19安裝配置NFS并连接开发板 zyl-1014-5-6

安装启动NFS服务
安装NFS服务#yum install nfs-utils*#yum install portmap

关闭Fedora默认的防火墙,#systemctl stop firewalld
启用NFS服务# systemctl enable nfs-server.service
ln -s '/lib/systemd/system/nfs-server.service''/etc/systemd/system/multi-user.target.wants/nfs-server.service'
检查NFS服务是否被启用
# systemctl is-enabled nfs-server.service
enabled

配置需要nfs导出的文件:

     #vi /etc/exports

      /root/rootfs *(rw,sync,no_root_squash)


启动NFS服务# systemctl start nfs-server.service
     
或者用service命令# service nfs-server restart
      Redirectingto /bin/systemctl  restart nfs-server.service

查看NFS服务状态# systemctl status nfs-server.service
      nfs-server.service- NFS Server

       Loaded:loaded (/lib/systemd/system/nfs-server.service; enabled)
       Active:active (running) since Sun, 29 Apr 2012 11:08:59 +0800; 1min 46s ago

本地测试# showmount -e 192.168.0.117 测试结果:


# moun
t -t 192.168.0.117:/root/rootfs  /mnt/nfs    

出现错误1

对于最后一个错误:mount.nfs : access denied by server whilemounting

192.168.0.117:/root/Work,根据网址:

http://liuzhigong.blog.163.com/blog/static/17827237520115305226932/

修改配置文件/etc/exports,加入 insecure 选项

/root/rootfs *(insecure,rw,sync,no_root_squash)

# mount -t nfs192.168.0.117:/root/rootfs  /mnt

出现errormount.nfs:Connection timed out

Slove:http://bbs.chinaunix.net/thread-4121859-1-1.html:关闭防火墙

http://bbs.csdn.net/topics/360017569

关闭Fedora默认的防火墙,#systemctl stop firewalld:

使用## mount -t nfs –o tcp192.168.0.117:/root/rootfs  /mnt/nfs

#Mount –t nfs –onolock 192.168.1.104:/root/rootfs /mnt/nfs

通过df  -h 查看:

参考网站:http://my.oschina.net/davisqi/blog/76124

http://blog.chinaunix.net/uid-9679478-id-4145508.html

卸载:

# umount /mnt

 

注意:每次修改过 /etc/exports 文件内容之后都要重启NFS服务。经过本地showmount测试,重新挂载。

 

设置开发板:

要想ARM开发板和pc机能够建立网络共享,必须将ARM开发板与PC通过网线连接起来

并且设置ARM开发板和pc机在同一网段内,我们可以用一下命令查看和修改ARM开发板

IP地址:

  Ifconfig  //查看以太网Ip地址,

  Ifconfig  eth0(端口名) ip地址1//ip地址1要与PCip处在同一网段中。

测试ping (PCip地址),查看是否能够ping

注意:1#systemctlstop firewalld

     2,开启nfs服务

      3测试nfs

      2,在主机上测试

      3,在目标机上mount

 

Arm开发板和PC机挂接:

使用如下命令:

Mount –t nfs –o nolock192.168.1.104:/root/rootfs  /mnt/nfs

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值