1. Install nfs server software
sudo apt install nfs-kernel-server
2. Modify the configuration file, add the directory for sharing on nfs-server, and set the client IP that is allowed to access the directory, and its read and write permissions.
sudo vim /etc/exports
3. Start nfs service
service nfs-kernel-server restart;service nfs-kernel-server status