How to configure Setup NFS Rhel5


NFS Network File sharing is used for sharing the file from One Linux system to another Linux system. Before configure NFS we need to stop the iptables and firewall – selinux.
[root@redhat ~]# service iptables stop
[root@redhat ~]# chkconfig iptables off
[root@redhat ~]# sestatus
SELinux status: disabled
/etc/exports file is NFS export file here we need insert  the directory which one we want to share and next parameter we need to mention which network share the directory
[root@redhat ~]# vi /etc/exports
/home *(rw)
*(rw) all the network share the file Network only it will share file
* it will share file only in domain
Default After Redhat Linux Installation NFS service is installed we need to restart that service.[root@redhat ~]# service nfs restart
Shutting down NFS mountd: [FAILED]
Shutting down NFS daemon: [FAILED]
Shutting down NFS quotas: [FAILED]
Shutting down NFS services: [FAILED]
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
[root@redhat ~]# service portmap restart
port map is RPC program number mapper

Then using show mount command we need to check whether that folder is shared or not
[root@redhat ~]# showmount -e
Export list for
/home *
NFS CLIENT SIDE -Network File sharing
Then mount the NFS shared directory into the mnt using mount command

[root@redhat ~]# mount /mnt
[root@redhat ~]# cd /mnt/
[root@redhat mnt]# ls
Then we can able to access the shared file we can read and write
aquota.user bashscript lost+found.
NFS Mount Option
mount -F nfs -o soft #Soft Mount
mount -F nfs -o hard #Hard Mount
nosuid - Disable set uid and set gid.
risze,wsize -read and write the large data block size.
tcp, udp - specify the nfs protocol as TCP and UDP.
noacl - disable acl processing.
nolock- Disable the file locking

No comments:
Write comments