How to Install NFS (Network File System) on CentOS 8


Easily deploy your favorite applications in seconds at an unbeatable price for your next projects.

Installing NFS (Network File System) on CentOS 8

NFS (Network File System) is a distributed file system protocol that allows you to share files and directories between multiple Linux or Unix-like systems over a network. It enables you to access remote files as if they were on your local system.

To install NFS on CentOS 8, follow these steps:

sudo dnf update
sudo dnf install nfs-utils
sudo systemctl start nfs-server
sudo systemctl enable nfs-server

The NFS server is now running on your system.

sudo mkdir /mnt/nfs_share
sudo chown nobody:nobody /mnt/nfs_share
sudo chmod 777 /mnt/nfs_share
sudo nano /etc/exports

Add the following line to the file:

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

Save and close the file.

sudo exportfs -a
sudo firewall-cmd --add-service=nfs --permanent
sudo firewall-cmd --reload

If you want to allow specific client systems to access the NFS server, you can specify their IP addresses or hostnames in the /etc/exports file. For example:

/mnt/nfs_share client1.example.com(rw,sync,no_subtree_check)

Save the file and export the changes by running sudo exportfs -a.

sudo mkdir /mnt/nfs_client
sudo mount nfs_server_ip:/mnt/nfs_share /mnt/nfs_client

Replace nfs_server_ip with the IP address of the NFS server.

  1. Update the system packages:
  2. Install the NFS package:
  3. Start and enable the NFS server:
  4. Create a directory to be shared:
  5. Set the appropriate permissions for the shared directory:
  6. Edit the exports file to configure the shared directory:
  7. Export the shared directory:
  8. Allow NFS traffic in the firewall:
  9. Configure client access (optional):
  10. Mount the NFS share on the client system:

You have successfully installed and configured NFS on CentOS 8. Now you can access the shared directory on the client system.

Installing NFS on CentOS 8
NFS installation on CentOS 8
CentOS 8 NFS installation guide
How to install NFS on CentOS 8
Step-by-step guide to install NFS on CentOS 8
NFS setup on CentOS 8
CentOS 8 NFS setup tutorial
NFS configuration on CentOS 8
CentOS 8 NFS configuration steps
NFS server installation on CentOS 8

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.