Setup a NFSv4 Server
This document describes briefly how to setup an NFSv4 server and/or client.
Preparation:
Install nfs-utils
Make sure util-linux is updated
Add "load-module nfs" to /etc/sysconfig/modules
Server:
1. Add firewall rules:
# Allow NFS
add in-iface lo tcp dport 111 accept
add in-iface lo udp dport 111 accept
add in-iface eth1 tcp dport 111 accept
add in-iface eth1 udp dport 111 accept
add in-iface eth1 tcp dport 2049 accept
add in-iface eth1 udp dport 2049 accept
2. Edit /etc/exports and setup the shares as per man exports
/var/vmail 192.168.2.0/24(rw,no_subtree_check,no_root_squash,fsid=0)
3. Start services
service rpcbind start
chkconfig rpcbind on
service rpcidmapd start
chkconfig rpcidmapd on
service nfslock start
chkconfig nfslock on
service nfs start
chkconfig nfs on
Client:
1. Start services
service rpcbind start
chkconfig rpcbind on
service rpcidmapd start
chkconfig rpcidmapd on
service nfslock start
chkconfig nfslock on
Mount using...
mount -t nfs4 -o proto=tcp server:/ mnt_point
- Login to post comments
