服务端关键命令:
apt install nfs-kernel-server
mkdir -p /mnt/linuxidc
chown nobody:nogroup /mnt/linuxidc
chmod 777 /mnt/linuxidc
vim /etc/exports # /mnt/linuxidc 192.168.182.0/24(rw,sync,no_subtree_check)
exportfs -a
systemctl restart nfs-kernel-server
ufw allow from 192.168.182.0/24 to any port nfs
客户端关键命令:
apt-get install nfs-common
mkdir -p /mnt/linuxidc_client
mount 192.168.182.172:/mnt/linuxidc /mnt/linuxidc_client