# yum -y install nfs-utils rpcbind网络
#
开启服务
service nfs start
service rpcbind start
#
配置
nano /etc/exports
#
配置文件内容
/home/filesrv 10.1.8.*(rw,sync)
#
配置生效
exportfs -r
#
检查
showmount -e
#
共享文件夹的权限
chmod 777 /home/filesrv
#
所用到的端口
rpcinfo -p
#
添加容许端口到iptables或关闭iptables
#
重要 此服务器不暴露在公网时或只能经过内网IP访问时这样作,不然不建议这样作。
iptables -A INPUT -p tcp --dport 111 -j ACCEPT
iptables -A INPUT -p udp --dport 111 -j ACCEPT
........
#
检查服务端共享状况
showmount -e 10.1.8.25
#
挂载共享文件夹到本机
mount -t nfs 10.1.8.25:/home/filesrv /home/fileapp tcp