Loading...

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

Simple.Predictable.Scalable

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

Installing NFS (Network File System) on CentOS 7

NFS (Network File System) is a distributed file system protocol that allows you to share files and directories with other Linux/Unix clients over a network. It enables multiple computers to access the same files and directories concurrently. NFS is commonly used in environments where centralized storage is required and file sharing between multiple systems is necessary.

Here are the steps to install NFS on CentOS 7:

Step 1: Update System Packages

Before installing any new software, it's good practice to update the system packages to their latest versions by running the following command:

sudo yum update -y

Step 2: Install NFS Server

To install NFS server, run the following command:

sudo yum install nfs-utils -y

Step 3: Enable and Start NFS Services

Next, enable and start the required NFS services by running the following commands:

sudo systemctl enable nfs-server rpcbind sudo systemctl start nfs-server rpcbind

Step 4: Configure NFS Exports

Now, we need to configure the NFS exports, which specify the directories that will be shared with other systems. Edit the NFS exports file using your preferred text editor:

sudo vi /etc/exports

Add the directories that you want to share in the following format:

/path/to/directory client_ip(rw,sync)

Replace /path/to/directory with the actual path of the directory you want to share, and client_ip with the IP address or subnet of the client system that will be allowed to access the shared directory.

For example, to share the directory /shared with a client at IP address 192.168.1.100, add the following line:

/shared 192.168.1.100(rw,sync)

Save and close the file.

Step 5: Export NFS Shares

After configuring the NFS exports, you need to export them by running the following command:

sudo exportfs -a

Step 6: Allow NFS Services Through Firewall

If you have the firewall enabled, allow NFS services through the firewall by running the following commands:

sudo firewall-cmd --permanent --zone=public --add-service=nfs sudo firewall-cmd --reload

Step 7: Test NFS Mount

Now, you can test the NFS mount by mounting the shared directory on the client system. On the client system, run the following command:

sudo mount server_ip:/shared /mnt

Replace server_ip with the IP address of the NFS server.

If the mount is successful, you should be able to access the shared directory on the client system.

Congratulations! You have successfully installed and configured NFS on CentOS 7. You can now share files and directories between your systems using NFS.

Installing NFS
Network File System
NFS on CentOS 7
CentOS 7 NFS
CentOS 7 Network File System
NFS installation on CentOS 7
NFS setup on CentOS 7
how to install NFS on CentOS 7
NFS configuration on CentOS 7
step-by-step guide to install NFS on CentOS 7

Why Customers Love Us

What our customers say about us

Ready To Get Started For Free?

Create your free account today.