一、服务端安装步骤
1、安装nfs服务(26.45)
yum -y install nfs-utils rpcbind
mkdir /data/dzda/jieshou_zip
chmod 777 /data/dzda/jieshou_zip
vim /etc/exports
/data/dzda/jieshou_zip 10.4.102.30(insecure,rw)
/data/dzda/jieshou_zip 10.4.102.148(insecure,rw)
2、启动rpcbind、启动nfs
systemctl start rpcbind
systemctl start nfs
3、系统启动时启动rpcbind、nfs服务
systemctl enable rpcbind
systemctl enable nfs
4、查看本级发布的共享目录
exportfs - rv
192.9.26.43
/data/dzda/jieshou_zip 10.4.102.77(insecure,rw)
/data/dzda/jieshou_zip 10.4.102.225(insecure,rw)
192.9.26.44
/data/dzda/jieshou_zip 10.4.102.99(insecure,rw)
192.9.26.45
/data/dzda/jieshou_zip 10.4.102.30(insecure,rw)
/data/dzda/jieshou_zip 10.4.102.148(insecure,rw)
二、客户端安装步骤
服务器5.250和服务器26.49
192.9.5.250挂载192.9.26.45(10.4.102.11)服务器的/data/dzda/jieshou_zip目录
1、安装nfs相关服务
yum -y install nfs-utils rpcbind
2、启动rpcbind、启动nfs
systemctl start rpcbind
systemctl start nfs
3、系统启动时启动rpcbind、nfs服务
systemctl enable rpcbind
systemctl enable nfs
4、挂载目录
mount -t nfs 10.4.102.11:/data/dzda/jieshou_zip /data/dzda/jieshou_zip
5、设置开机自动挂载
echo "mount -t nfs 10.4.102.11:/data/dzda/jieshou_zip /data/dzda/jieshou_zip" >> /etc/rc.local
chmod u+x /etc/rc.local
6、停止挂载(暂时不需要)
umount /data/dzda/jieshou_zip