服务器端
1. nfs安装
yum nfs portmap
2. nfs服务器上需要开启以下端口的访问权限
2049(nfs)/111(rpc)/ 2849(mountd)
mountd端口默认是不确定的,在/etc/services中添加如下条目:
mountd 2849/tcp
mountd 2849/udp
3. 服务器端配置 /etc/exports
/data 212.191.2.6(ro,async)
/opt/data 232.191.2.6(ro,async)
4. 启动nfs服务
service portmap start
service nfs start
客户端
5. 安装nfs,同1
6. 启动nfs,同4
7. 挂载
mount -t nfs 1.2.3.4:/data /opt/a
mount -t nfs 1.2.3.4:/opt/data /opt/b