离线安装 NFS 服务
下载链接:
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/nfs-utils-1.3.0-0.68.el7.x86_64.rpm
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/gssproxy-0.7.0-29.el7.x86_64.rpm
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/keyutils-1.5.8-3.el7.x86_64.rpm
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/keyutils-libs-1.5.8-3.el7.x86_64.rpm
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/libevent-2.0.21-4.el7.x86_64.rpm
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/libevent-devel-2.0.21-4.el7.x86_64.rpm
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/libnfsidmap-0.25-19.el7.x86_64.rpm
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/libnfsidmap-devel-0.25-19.el7.x86_64.rpm
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/quota-4.01-19.el7.x86_64.rpm
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/quota-devel-4.01-19.el7.x86_64.rpm
https://mirrors.aliyun.com/centos/7.9.2009/os/x86_64/Packages/rpcbind-0.2.0-49.el7.x86_64.rpm
rpm -ivh --force --nodeps *.rpm
systemctl enable rpcbind.service
systemctl enable nfs-server.service
systemctl start rpcbind.service
systemctl start nfs-server.service
systemctl status rpcbind.service
systemctl status nfs-server.service
NFS 服务端(172.17.3.36)配置
chown -R nfsnobody:nfsnobody /home/apps_share/files/
chmod -R 766 /home/apps_share/files/
/home/apps_share/files/ 172.17.3.0/24(rw,sync,no_root_squash,no_all_squash)
exportfs -rav
systemctl restart nfs-server
firewall-cmd --permanent --zone=public --add-service=nfs
firewall-cmd --permanent --zone=public --add-service=mountd
firewall-cmd --permanent --zone=public --add-service=rpc-bind
firewall-cmd --reload
NFS 客户端(172.17.3.37)挂载配置
cp -rf /home/apps_share/files /home/backup/
cd /home/apps_share/files
rm -rf *
sudo mount -t nfs 172.17.4.64:/home/apps_share/files /home/apps_share/files
172.17.3.36:/home/apps_share/files /home/apps_share/files nfs defaults 0 0