Setting up NFS

In this post we will create an NFS share that will be used by all the machines on our Host-Only network.

Setting up NFS Server

On our main server, labx-server, install nfs-server

  • Install file server group list

    yum -y groupinstall file-server

  • Enable services on boot

    systemctl enable rpbcind nfs-server

  • Start the services

    systemctl start rpcbind systemctl start nfs-server

  • Setup the shared directories

    mkdir /nfs ; chmod 0777 /nfs

  • Edit /etc/exportfs to assign permissions


  • Export the directory

    exportfs -avr

  • Confirm the share

    showmount -e localhost

Setting up the clients

  • Install nfs-utils and rpcbind

    yum -y install nfs-utils rpcbind

  • Start rpbcind

    systemctl enable rpcbind ; systemctl start rpcbind

  • Create the mount point

    mkdir -p /nfs

  • Edit /etc/fstab and add the mount point /nfs nfs defaults 0 0

Written on February 6, 2016