NFS 服务部署
NFS 服务部署
# 安装 NFS 服务
yum install nfs-utils nfs-utils-lib rpcbind -y
systemctl enable rpcbind
systemctl enable nfs-server
systemctl enable nfs-lock
systemctl enable nfs-idmap
systemctl start rpcbind
systemctl start nfs-server
systemctl start nfs-lock
systemctl start nfs-idmap
# 生成 NFS 配置
tee /etc/exports <<-'EOF'
/data/websites/app 10.10.8/24(rw,sync,no_root_squash,no_all_squash)
/data/websites/storage 10.1.0.8/24(rw,sync,no_root_squash,no_all_squash)
/data/websites/public 10.1.0.8/24(rw,sync,no_root_squash,no_all_squash)
/data/websites/storage 10.1.0.8/24(rw,sync,no_root_squash,no_all_squash)
EOF
# 设置防火墙并重启服务
systemctl restart nfs-server
firewall-cmd --permanent --zone=public --add-service=nfs
firewall-cmd --reload
珊瑚海

浙公网安备 33010602011771号