Skip to content

NFS

The following describe how to configure a Red Hat Enterprise Linux 8 or equivalent server to serve out NFS shares.

Install nfs-utils:

dnf install nfs-utils -y

Enable and start the two required services required:

systemctl enable --now rpcbind
systemctl enable --now nfs-server

Open the required firewall ports:

firewall-cmd --permanent --add-service=nfs
firewall-cmd --permanent --add-service=rpc-bind
firewall-cmd --permanent --add-service=mountd
firewall-cmd --reload

Depending on the storage available, create directories on the NFS host to share out, for example:

mkdir -p /nfs/my_share

Then define the share in /etc/exports:

/etc/exports
/nfs/my_share             192.168.1.1/24(rw,sync,no_wdelay,no_root_squash,insecure)

Use the following command to make any defined share available:

exportfs -arv

Use the following commands to view available shares on the NFS host:

exportfs  -s
showmount -e 127.0.0.1

You can also use the showmount command on an external host to test the visibility:

showmount -e 192.168.1.100