Sunday, August 4, 2013

How to configure nfs server in Linux

NFS is an excellent way of sharing files between Linux and other UNIX systems. While Samba is a great choice due to the compatibility with Windows, if you're in a Windows-lessenvironment, NFS may be a better choice.
NFS allows for machines to mount without authentication, at boot, which is great if you have a cluster of systems or if you want to use a centralized home directory system (using an NFS-mounted directory for home directories to keep your configurations and files identical on multiple systems).

#######• From SERVER•#######

Step 1 - Installing NFS packages
# yum install nfs*

Step 2 - Edit the export file and add  the folder name which you want to share.
# vi /etc/exports
/example           *(rw,sync)

:wq!

Step 3 - Starting NFS service
# service nfs restart
# service portmap restart

Note : From server you have to stop Firewall and SE Linux
# service iptables stop
# setenforce 0

#######• From CLIENT•#######

Step 1 - Check the connectivity to your NFS server
# ping 192.168.1.10 (your NFS Server IP)

Step 2 - To see the shared folders in NFS server
# showmount –e 192.168.1.10 (your NFS Server IP).

Step 3 - Mounting shared directories
 # mount 192.168.1.10:/example /mnt

Note : Here 192.168.1.10:/example  is your source means shared directory. /mnt is destination (client)..


2 comments: