How to Setup NFS (Network File System) on RHEL/CentOS/Fedora and Debian/Ubuntu

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.95/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Tarunika Shrivastava

I am a linux server admin and love to play with Linux and all other distributions of it. I am working as System Engineer with a Web Hosting Company.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

104 Responses

  1. parvesh says:

    Hi its very fine with your site, but, you missed one command after,

    # /etc/exports
    # exportfs -avr
    
  2. Mini says:

    On CentOS 6.x i got error “unable to register (RQUOTAPROG, RQUOTAVERS, udp)”, “Connection refused”.

    I had to start & enable rpcbind service:
    service rpcbind start;chkconfig rpcbind on

  3. Bridgette says:

    I am trying to execute this on Centos 7 and can’t find nfs-utils-lib using yum. Any advice?

  4. Rupesh says:

    Really a very help instructive article.

    I have mounted a directory of one system on another.

    Now I am not able to create file/folder from that client system into this mount point.

    How can I create file or folder from that client system into the mount point i.e. into the shared directory of the server?

    • Ravi Saive says:

      @Rupesh,

      Please check that you’ve given rw permission on the NFS server mount point..

      • Rupesh says:

        Thanks Ravi for the quick suggestion.

        rw permission was already given.
        However the root_squash applied on the server shared directory was denying the permission to create files in it from the client machine.
        Using no_root_squash solved the issue.

  5. Gayathri says:

    when I use showmount command there is a port map failure in client side. How to rectify this. Please share the answers

  6. Mushtaque says:

    This article shows to share with 1 nfs client, in case I have 1000+ clients to share the same directory ? Please help

    • Ravi Saive says:

      @Mustaque,

      Same procedure, manually mount the nfs share on client machines, or if you have good scripting skills you can automate it..

  7. vasu says:

    But Really so usefull and clearly explained by you people ,thanks for this posting and tecmint

  8. vasu says:

    Hi Ravi,

    Will please add firewall rules to respect to nfs in this will be more usefull

Got something to say? Join the discussion.

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