【FAQ】全志R系列Tina 如何使用 NFS?
- 
					
					
					
					
 NFS(Network File System,网络文件系统)可用于客户端访问服务器端的文件,并且从上层看其过程与访问本地文件相同。 以下介绍如何将 Tina 作为客户端、Ubuntu 电脑作为服务器端使用。 配置 客户端 在 Tina 的 kernel_menuconfig 中选上以下内容: File systems ---> [*] Network File Systems ---> <*> NFS client support服务器端 
 ( 下面以 Ubuntu 14.04 为例,新一些版本的 Ubuntu 可能使用 systemd 管理系统服务,用到的命令会有所不同 )安装 nfs 服务器端软件包: sudo apt-get install nfs-kernel-server打开 /etc/exports 文件,添加需要共享的目录: /path/to/share *(rw,sync,no_root_squash,no_subtree_check)- /path/to/share 是共享的目录
- 表示允许所有网段访问
- rw 表示允许读写
 更多的配置说明可用 man 5 exports 查看 exports 的手册。 接着重启 NFS 服务: sudo /etc/init.d/rpcbind restart sudo /etc/init.d/nfs-kernel-server restart使用 客户端和服务器端连接到 同一个网段,接着在客户端执行挂载命令: mount -t nfs -o nolock <server_address>:/path/to/share /local/mnt/dir <server_address> 为服务器端的地址,一般使用 IP 地址 /path/to/share 为服务器端共享的目录 /local/mnt/dir 为客户端挂载的目录此处若不加 -o nolock 在某些情况下可能会挂载失败,尚不清楚原因。如果加上后无法挂载成功可以尝试去掉看看。 
- 
				Referenced by q1215200171 q1215200171
- 
				Referenced by q1215200171 q1215200171
- 
				Referenced by q1215200171 q1215200171
- 
				Referenced by q1215200171 q1215200171
- 
				Referenced by q1215200171 q1215200171
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号