ArchiveAbout

Kyle Pericak

"It works in my environment"

Created: 2020-03-09Updated: 2020-03-09

Ubuntu NFS Server Setup

Category:systems administrationTags:ubuntunfs;
Installing, configuring, and testing NFS server on Ubuntu 18.04

Install & Configure NFS Server

These steps were tested on Ubuntu 18.04.

# Install the NFS server package
apt-get install nfs-kernel-server

# Make a directory to publish
mkdir /nfs

# Set permissions
chown nobody:nogroup /nfs
chmod 777 /nfs

Configure NFS by writing /etc/exports. In this example I'm allowing access from anyone on the 10.10.0.0/16 subnet. This is only secure if you trust that entire subnet and any systems which might be routed to it.

/nfs 10.10.0.0/16(rw,sync,no_subtree_check)

Apply the changes

exportfs -a
systemctl restart nfs-kernel-server

NFS client setup

# Install client software
apt-get install nfs-common

# Create mount point
mkdir /nfs

# Mount the NFS share manually
mount 10.10.10.9:/nfs /nfs
Tags
ansible
Blog code last updated on 2024-02-18: 5ab386de2324c1884556552d0f043a42f2f726ab