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.

Your name can also be listed here. Work as a Paid freelancer/writer at TecMint.

Download Free Linux eBooks

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

41 Responses

  1. abdul khan says:

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

  2. 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

  3. 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=""> <strike> <strong>

Join Over 62000+ Linux Users
  1. 46679
  2. 2055
  3. 10101

Enter your email to get latest Linux Howto's