User Tools

Site Tools


linux:ubuntu_nfs_install

Ubuntu Nfs Install

On the server.

apt install nfs-kernel-server

On the server. Create the shared directory and set the proper permissions.

mkdir -p /mnt/nfs_share
chown -R nobody:nogroup /mnt/nfs_share/
chmod 777 /mnt/nfs_share/

Grant access to clients.

vi /etc/exports

Add the following:

/mnt/nfs_share client_ip_here(rw,sync,no_subtree_check)

Make the Nfs share accesable.

exportfs -a

Restart the Nfs server.

systemctl restart nfs-kernel-server

On the client.

apt install nfs-common

Create the client directory.

mkdir -p /mnt/nfs_clientshare

Mount the client directory.

mount server_ip_here:/mnt/nfs_share /mnt/nfs_clientshare

Mount the Nfs share on the client at boot time.

vi /etc/fstab

Add the following.

nfs_server_ip_here:/mnt/nfs_share  /mnt/nfs_clientshare  nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0
linux/ubuntu_nfs_install.txt · Last modified: 27/10/2022 11:38 by Allan