设为首页 加入收藏

TOP

ARM busybox连接NFS
2014-11-24 08:07:58 来源: 作者: 【 】 浏览:0
Tags:ARM busybox 连接 NFS

主要步骤:
1 在PC上,建立NFS服务器。
2 在PC上,确认NFS服务器正确。
3 telent上ARM板busybox, mount -t nfs -o nolock 10.0.2.130:/export /home


建立NFS服务器
1 假设防火墙已经关闭
2 安装yum install nfs-utils.i686
3 安装yum install rpc2 (我实验时,已经安装过了,这是一个很基本的服务)
4 vi /etc/idmapd.conf
[General]
Domain = localdomain # 用dnsdomainname得到,search "Linux: find out information about current domain name and host name"


[Mapping]
Nobody-User = nfsnobody
Nobody-Group = nfsnobody
5 启动nfs(nfs相关服务为rpcbind,一般都正常,不用管)
systemctl enable nfs-server.service
systemctl start nfs-server.service
6 mkdir -p /export/{share1,share2,share3}
sudo chmod -R a+rwx /export # 我不想碰到权限问题,将权限开到最大
7 vi /etc/export
/export 127.0.0.1(ro,sync)
/export 10.0.2.0/255.255.255.0(rw,sync,insecure,no_root_squash)
/home/hl/temp 10.0.2.131(rw,sync,insecure,no_root_squash)
/home/hl/temp 10.0.2.132(rw,sync,insecure,no_root_squash)
/home/hl/temp 要有777权限,这里允许整个10.0.2.*段访问,ip段有3种写法:
single host
wildcards *.example.com
IP networks 192.168.0.0/28 allows the first 16 IP addresses, from 192.168.0.0 to 192.168.0.15, to access the exported file system, but not 192.168.0.16 and higher.
8 exportfs -rv # nfs重读配置


PC端NFS客户端配置
因为服务器和客户端都在一台机器上,没什么好配置的。
以root用户登录
sudo mount -t nfs 127.0.0.1:/ 这时应该出来可以mount的目录
sudo mount -t nfs 127.0.0.1:/export /mnt
umount /mnt
sudo mount -t nfs 10.0.2.130:/export /mnt # 如果不成功,要看ip是否正确。


ARM板busybox
当然,内核、busybox编译时,都要支持nfs。
不需要配置,唯一注意的是,需要-o nolock选项。
mount -t nfs -o nolock 10.0.2.130:/export /home
mount -t nfs -o nolock 10.0.2.130:/home/hl/temp /home


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Android HTTPPOST方法请求数据 下一篇Android 图片转灰度

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·About - Redis (2025-12-26 08:20:56)
·Redis: A Comprehens (2025-12-26 08:20:53)
·Redis - The Real-ti (2025-12-26 08:20:50)
·Bash 脚本教程——Li (2025-12-26 07:53:35)
·实战篇!Linux shell (2025-12-26 07:53:32)