NFS (Network File System)
NFS SERVER SIDE
sudo apt install nfs-kernel-server
make sure to start rpcbind, tho it is always enabled
systemctl enable --now rpcbind
RPCBIND
Remote Procedure Call
Connects ports between client and server
NFSv2 and NFSv3 require rpcbind
NFSv4 does not need it
Reduces the number of required ports
Hurts compatibility
touk@ubuntu:/srv/nfs$ sudo mkdir files
touk@ubuntu:/srv/nfs$ sudo chmod o+rw files
touk@ubuntu:/srv/nfs$ ls -l
total 4
drwxr-xrwx 2 root root 4096 Aug 31 06:32 filesNow, i need to tell NFS to share this folder and i’ll do that in /etc/exports
sudo vim /etc/exports
Reload the config file sudo exportfs -r
sudo exportfs -v #to verify
Update portmap sudo systemctl restart nfs-kernel-server
NFS CLIENT SIDE
sudo apt install nfs-common
or in credhat distros: sudo yum install nfs-utils
df -h
sudo mount -t nfs 192.168.1.12:/srv/nfs/files /mnt/nfs_share df -h
To see the NFS Activity use this command:
nfsstat
Last updated