nfs是基于rpcbind下的
服务端:yum install rpcbind nfs-untils
service rpcbind start
service nfs start
注意按顺序启动
在/etc/exports里加上
共享的目录 共享的ip(参数)
showmount -e localhost 可以看到nfs了啥
客户端:
安装nfs-untils就行
mount 服务端ip :共享的目录 挂载的目录
常见问题:
1.showmount -e 服务端ip 出现clnt_create:RPC:Port mapper failure – Unable to receive:errno 113(No route to host)不用说又是防火墙的鬼service iptables stop
2.mount 连接超时mount.nfs: access denied by server while mounting 端口大于1024的原因 修改配置文件/etc/exports,加入 insecure 选项