ubuntu下nfs使用笔记
nfs服务端安装配置
apt install nfs-kernel-server
mkdir /root/workspace
chmod 755 root/workspace
# 增加目录
echo '/root/workspace *(rw,sync,no_root_squash)' >> /etc/exports
systemctl restart nfs-kernel-server
nfs客户端安装配置
apt-get install nfs-common
mkdir /root/workspace
mount -t nfs 192.168.129.213:/root/workspace/root/workspace
开机自动挂载
# 配置自动挂载, 不熟悉的建议备份/etc/fstab,修改后务必检查修改内容
echo '192.168.129.213:/root/workspace /root/workspace nfs defaults 0 0' >> /etc/fstab