标签:ram stop 客户 macbook gis etc mount client list
安装服务
sudo apt-get install portmap
sudo apt-get install nfs-kernel-server
配置:
sudo nano /etc/exports
添加 ,
/home/pi/nfs 192.168.1.*(rw,sync,no_subtree_check)
先创建/home/pi/nfs文件夹,并修改访问权限。
启动NFS Server
sudo /etc/init.d/nfs-kernel-server start
检查是否启动成功
showmount -e localhost
如果报错 clnt_create: RPC: Program not registered 是nfs服务器没有启动
如果没有启动,使用如下命令启动
sudo /etc/init.d/rpcbind stop 停止rpcbind
sudo /etc/init.d/nfs-kernel-server stop 停止nfs
sudo /etc/init.d/rpcbind start 启动rpcbind
sudo /etc/init.d/nfs-kernel-server start 启动nfs
查看启动
pi@raspberrypi:~/nfs $ showmount -e localhost
Export list for localhost:
/home/pi/nfs 192.168.1.*
也可以再client上查看启动情况
shawnMacBook:~ mengshunxiang$ showmount -e 192.168.1.112
Exports list on 192.168.1.112:
/home/pi/nfs 192.168.1.*
客户端(mac)进行连接
sudo mount -o resvport 192.168.1.112:/home/pi/nfs ~/Desktop/nfs
标签:ram stop 客户 macbook gis etc mount client list
原文地址:https://www.cnblogs.com/shawn-meng/p/9218765.html