Server#
Create export#
Edit /etc/exports:
/opt/export_folder *(rw,async,wdelay,all_squash,no_root_squash,anonuid=555,anongid=555)
Disable iptables#
$ service iptables save $ service iptables stop $ chkconfig iptables off
Start portmap#
$ sudo service portmap start
If portmap is not found, do
# CentOS $ sudo yum install portmap
and try again.
Start NFS#
$ sudo service nfs start
If nfs is not found, do
# CentOS $ sudo yum install nfs-utils
and try again
Export NFS#
$ sudo exportfs -av
Client#
Start portmap#
$ sudo service portmap start
Create mountpoint#
$ mkdir ~/mountpoint
Mount#
$ sudo mount -v server.domain.com:/opt/export_folder ~/mountpoint
On Mac, type
$ sudo mount -v -t nfs -o resvport server.domain.com:/opt/export_folder ~/mountpoint
Debug#
Client#
From the client, run
$ rpcinfo server.domain.com
You should see NFS listed.
You can also do
$ showmount -e server.domain.com
to get a list of the exports.
Server#
Doing
$ rpcinfo -p
should show you nfs.
Doing
$ sudo service --status-all | grep nfs
should show you the nfs process.
External References#
Linux - Networking