Friday, May 14, 2010

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.
NFS SERVER SIDE
[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
192.168.0.0/24(rw) 192.168.0.0 Network only it will share file
*.linuxrhel5.com it will share file only in linuxrhel5.com 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 10.0.0.2
Export list for 10.0.0.2:
/home *
NFS CLIENT SIDE -Network File sharing
Then mount the NFS shared directory into the mnt using mount command

[root@redhat ~]# mount 10.0.0.2:/home /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

0 comments:

Flag counter

free counters