NFS on Centos 6

How to install NFS on Centos 6

yum install nfs-utils nfs-utils-lib

Set nfs to start at boot and start services

chkconfig nfs on 
service rpcbind start
service nfs start

Add the directory you want to share to /etc/exports

/home           1.2.3.4(rw,sync,no_root_squash,no_subtree_check)

1.2.3.4 is IP which is allowed to mount shared folder
rw allows to read-write the folder
sync confirms requests to the shared directory only once the changes have been committed.
no_subtree_check prevents the subtree checking.
no_root_squash allows root to connect to the designated directory
Once you have added shared folder run following command to export settings

exportfs -a

Look your current file system

df -h

Setting up client 

yum install nfs-utils nfs-utils-lib

Create folder for mounting file system

mkdir -p /mnt/nfs/home

Mount file system

mount 2.3.4.5:/home /mnt/nfs/home

2.3.4.5 is IP of server with shared file system.

 

Was this answer helpful?

 Print this Article

Also Read

Centos 6 Webserver

In this article we will install some software that is useful on a webserver based on...

Adding a new disk drive to Centos 6

Installing a new HDD The disk drives in Centos is named hd* or sd*. In system with only one...

LXDE + xrdp

How to install Lightweight X11 Desktop Environment (LXDE) on Ubuntu. apt-get update...

Epel Centos

Some packages are missing from the base repository. This guide shows how to install RHEL EPEL...

Usefull linux tools

please note: for installing some toosl you ned to connect EPEL repo first. htop -extened version...