uNFS搭建
参考:https://www.cnblogs.com/hwp0710/p/7942222.html
1.查看系统是否已安装NFS
rpm -qa | grep nfs
rpm -qa | grep rpcbind
2.安装NFS
yum -y install nfs-utils rpcbind
3.创建共享目录
mkdir -p /data/upload
chmod 666 /data/uploads
4.编辑export文件
vim /etc/exports
/data/uploads 10.10.103.0/24(rw,no_root_squash,no_all_squash,sync)
配置生效:exportfs -r
5.启动rpcbind、nfs服务
service rpcbind start 或 systemctl start rpcbind.service
service nfs start 或 systemctl start nfs.service
测试:showmount -e localhost
6.客户端配置
yum -y install nfs-utils
mkdir -p /data/uploads
挂载:mount -t nfs 10.10.103.80:/data/uploads /data/uploads
卸载:umount -l /data/uploads