NFS Server and Client Installation on CentOS 7

image_pdfimage_print

The NFS server exposes the internal directory as the /export folder, which is bind-mounted on the host. The Docker host then mounts this folder using the NFS protocol to its /mnt folder. Then a so-called infrastructure container is created which binds the mount folder.

For Ubuntu :

 

NFS server on CentOS 7.

Network File System (NFS) is a popular distributed filesystem protocol that enables users to mount remote directories on their server.

hostname server1.example.com and IP as 192.168.0.100

Serverside

Now create the

Now we will share the NFS directory over the network a follows:

nano /etc/exports

We will make two sharing points  /home and /var/nfsshare. Edit the exports file as follows:

Note 192.168.0.101 is the IP of client machine, if you wish that any other client should access it you need to add the it IP wise other wise you can add “*” instead of IP for all IP access.

Condition is that it must be pingable at both ends.

start the NFS service:

Again we need to add the NFS service override in CentOS 7 firewall-cmd public zone service as:

Now we are ready with the NFS server part.

Client Side

 

Permanent NFS mounting

Add the entries like this:

Note 192.168.0.100 is the server NFS-share  IP address, it will vary in your case.

This will make the permanent mount of the NFS-share.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.