服务器
# more /etc/exports
/var/nfs 192.168.100.0/24(rw,sync)
/var/nfs/capthaA 192.168.100.0/24(rw,sync)
/var/nfs/capthaC 192.168.100.0/24(rw,sync)
/var/nfs/uploadimage 192.168.100.0/24(rw,sync)
客户端挂载
mount -t nfs 192.168.100.144:/var/nfs/uploadimage /var/www/BG/public/img/uploadimg
如果客户端不能写,则服务器这样配置
# more /etc/exports
/var/nfs 192.168.100.0/24(rw,sync,no_root_squash)
/var/nfs/capthaA 192.168.100.0/24(rw,sync,no_root_squash)
/var/nfs/capthaC 192.168.100.0/24(rw,sync,no_root_squash)
/var/nfs/uploadimage 192.168.100.0/24(rw,sync,no_root_squash)
别忘了启动nfs,开机启动nfs,防火墙规则放行。