This is an old revision of the document!
Network File System (NFS) is a distributed file system protocol that allows you to share remote directories over a network. With NFS, you can mount remote directories on your system and work with the files on the remote machine as if they were local files.
NFS protocol is not encrypted by default, and unlike Samba, it does not provide user authentication. Access to the server is restricted by the clients’ IP addresses or hostnames.
In this tutorial, you’ll go through the steps necessary to set up an NFSv4 Server on CentOS 8. We’ll also show you how to mount an NFS file system on the client.
The “nfs-utils” package provides the NFS utilities and daemons for the NFS server. To install it run the following command:
yum install nfs-utils systemctl enable nfs-server
NFS server configuration options are set in /etc/nfsmount.conf and /etc/nfs.conf files.
There are two ways to configure exports on an NFS server.
The /etc/exports file controls which file systems are exported to remote hosts and specifies options. It follows the following syntax rules:
We’ll create directory on /opt/apps that will be exported to NFS clients.