NFS setup and references

[ Back ]

Contents

Keywords:

Introduction

Necessary information to run a NFS server on RHEL 6.x / Scientific Linux 6.x and export resources through NFS.

/tmp

http://www.tldp.org/HOWTO/NFS-HOWTO/server.html
http://www.unixmen.com/nfs-server-installation-and-configuration-in-centos-6-3-rhel-6-3-and-scientific-linux-6-3/

Start NFS services:

# service rpcbind start
# chkconfig rpcbind on
# service nfs start
# chkconfig nfs on

Edit server configuration files:

  • /etc/exports
/path/to/shared/directory/   hostname(options)
  • /etc/hosts.allow (optional)
  • /etc/hosts.deny (optional)

Restart NFS:

# service nfs restart

Fixing firewall errors

Connection timeout error means that the firewall is blocking NFS on the server machine.

Edit /etc/sysconfig/iptables

-A INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT  
-A INPUT -m state --state NEW -m tcp -p tcp --dport 111 -j ACCEPT 
-A INPUT -m state --state NEW -m tcp -p tcp --dport 32803 -j ACCEPT 
-A INPUT -m state --state NEW -m tcp -p tcp --dport 892 -j ACCEPT  
-A INPUT -m state --state NEW -m tcp -p tcp --dport 875 -j ACCEPT 
-A INPUT -m state --state NEW -m tcp -p tcp --dport 662 -j ACCEPT 

then restart iptables service,

# service iptables restart



Last update: Luca Pacher - Jan 20, 2013