How to setup a NFS server on CentOS 6

This document describes how to configure your CentOS 6.x linux to act as a NFS Server to share any directories on your Network

Install required software

yum install nfs-utils

Configure NFS server

vim /etc/idmapd.conf

# line 5: uncomment and change to your domain name
Domain =

Configure NFS shares

vim /etc/exports


/home -> shared directory -> range of networks NFS permits accesses
rw -> writable
sync -> synchronize
no_root_squash -> enable root privilege
no_all_squash -> enable users' authority

Start NFS services

/etc/rc.d/init.d/rpcbind start
/etc/rc.d/init.d/nfslock start
/etc/rc.d/init.d/nfs start

Set services to start at boot

chkconfig rpcbind on
chkconfig nfslock on
chkconfig nfs on


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.