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

Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators

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.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

45 Responses

  1. Michael says:

    There is a typo in the /etc/fstab configuration section
    192.168.0.100:/nfsshare /mnt nfs defauls 0 0
    should be
    192.168.0.100:/nfsshare /mnt nfs defaults 0 0

  2. k says:

    Difference Between NFS and Samba???

  3. BABU B says:

    This website Really very help full to me to configure the NFS server & Client. Thanks

  4. abdul khan says:

    Hi, i am configured squid proxy (Transparent proxy)on centos server ,but never show https request log in /var/log/squid

  5. Dave says:

    OK, needing to do a silly RSYNC across two Centos 6.5 servers has seemed to be more problematic with NFS than it used to be with Ubuntu. Security over convenience, I suppose.

    Server:
    #sudo yum install nfs* -y
    #sudo nano /etc/exports
    add your export, in my case:
    /mnt/data 192.168.2.0/24(rw,sync,no_root_squash,no_subtree_check)
    #sudo nano /etc/sysconfig/iptables
    (add the following below the “*filter*, make sure to adjust IP)
    -A INPUT -s 192.168.2.0/24 -m state –state NEW -p udp –dport 111 -j ACCEPT
    -A INPUT -s 192.168.2.0/24 -m state –state NEW -p tcp –dport 111 -j ACCEPT
    -A INPUT -s 192.168.2.0/24 -m state –state NEW -p tcp –dport 2049 -j ACCEPT
    -A INPUT -s 192.168.2.0/24 -m state –state NEW -p tcp –dport 32803 -j ACCEPT
    -A INPUT -s 192.168.2.0/24 -m state –state NEW -p udp –dport 32769 -j ACCEPT
    -A INPUT -s 192.168.2.0/24 -m state –state NEW -p tcp –dport 892 -j ACCEPT
    -A INPUT -s 192.168.2.0/24 -m state –state NEW -p udp –dport 892 -j ACCEPT
    -A INPUT -s 192.168.2.0/24 -m state –state NEW -p tcp –dport 875 -j ACCEPT
    -A INPUT -s 192.168.2.0/24 -m state –state NEW -p udp –dport 875 -j ACCEPT
    -A INPUT -s 192.168.2.0/24 -m state –state NEW -p tcp –dport 662 -j ACCEPT
    -A INPUT -s 192.168.2.0/24 -m state –state NEW -p udp –dport 662 -j ACCEPT

    #sudo service iptables restart
    #sudo service nfs restart

    Centos client:
    #sudo yum install nfs* -y
    make sure you can ping the shares

  6. Dave N says:

    On Fedora 19, had to use the firewall GUI to set these to “public”, then everything worked:

    mountd
    nfs
    rpc-bind

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Join Over 70000+ Linux Users
  1. 48590
  2. 2375
  3. 13200

Enter your email to get latest Linux Howto's