nfs安装
B2B2C-SaaS 多元版 · nfs安装
1、所有节点
#所有机器安装yum install -y nfs-utils2、主节点
#nfs主节点echo "/nfs/data/ *(insecure,rw,sync,no_root_squash)" > /etc/exports
mkdir -p /nfs/datasystemctl enable rpcbind --nowsystemctl enable nfs-server --now#配置生效exportfs -r3、从节点
showmount -e 主节点ip
#执行以下命令挂载 nfs 服务器上的共享目录到本机路径 /root/nfsmountmkdir -p /nfs/data
mount -t nfs 主节点ip:/nfs/data /nfs/data# 写入一个测试文件echo "hello nfs server" > /nfs/data/test.txt