Server端配置如下

安装nfs server

1
sudo apt install nfs-kernel-server

创建文件夹,并设置文件夹权限为777

配置文件/etc/exports

1
sudo gedit /etc/exports

添加:

1
/home/pumpkin/nfsroot *(rw,sync,no_root_squash)

开启nfs服务

1
sudo /etc/init.d/nfs-kernel-server start

client端配置

安装nfs-common

1
sudo apt install nfs-common

远程mount

1
2
sudo mount 10.141.247.130:/home/pumpkin/nfsroot /media/share
ls /media/share # 查看