1.远程目录端10.224.0.234:
systemctl stop firewalld
setenforce 0
yum install nfs-utils -y
mkdir -p /data/share
vim /etc/exports
/data/share 10.224.0.231(rw,sync,no_root_squash,no_subtree_check)
systemctl restart rpcbind
systemctl restart nfs-server.service
exportfs -rv
2.客户端:
sudo yum -y install nfs-utils
yum install -y lvm2
showmount -e 10.224.0.234
mkdir -p /mnt/nfs
mount -t nfs 10.224.0.234:/data/share /mnt/nfs
df -h
--挂载第二个目录
showmount -e 10.224.0.233
mount -t nfs 10.224.0.233:/data/share /mnt/nfs
df -h
---------------
3.测试
cd /mnt/nfs
touch a.txt
查看10.224.0.234和10.224.0.233,可以找到a.txt文件
成功挂载远程目录