How to setup NFS on cent OS 6.6 final

NFS(Network File System) share storage, it requires two server one is server and second is client server.

server1 10.10.1.40

Client 10.10.1.50

let’s be a root

sudo su

To setup NFS server use below cmd.

yum install nfs-utils nfs-utils-lib
add services on startup

chkconfig nfs on

service rpcbind start

service nfs start

Now export the shared Directory

The directory should be added in to the “/etc/exports” file, Which is alos included what is share and how it is shared

Suppose we wanted to share the directory /data

vi /etc/exports
add below line in to it

/opt 12.33.44.555(rw,sync,no_root_squash,no_subtree_check)

*rw:-allows the client server to both read and write.

*sync:-it confirms request to the shared directory once changes been commited.

*no_subtree_check:- it prevents the subtree checking.

*no_root_squash:-it allows root to connect to the directory
Now save the file

:wq!

export all the setting by below cmd.

exportfs -a
Let’s configure client side configuration.

yum install nfs-utils nfs-utils-lib

Once nfs installed on server, create directory for share purpose.

mkdir /mnt/nfs/data

Mount it

mount 10.10.1.40:/data /mnt/nfs/data

we can check it by “df -h” command.

Ensure that the mount starts up after the server reboots.

vi /etc/fstab

10.10.1.40:/data /mnt/nfs/data nfs auto,noatime,nolock,bg,nfsvers=3,intr,tcp,actimeo=1800 0 0

Use below command for mount

mound -a.

To know more, please visit Nevprobusinesssolutions.com.

You must be logged in to post a comment.