Wednesday, August 24, 2016

Installation and configuration of NFS server

Network File System (NFS) is a network file system protocol originally developed by Sun Micro systems. It allows your users or client compute to access files over a network. Linux and UNIX like operating systems (including MS-Windows) can mount file system over a network and work as they are mounted locally. This is perfect for sharing files or centralized home directories.


Install NFS Server

[root@server Desktop]# yum install nfs*

[root@server Desktop]# mkdir /rhel

Share File System

[root@server Desktop]# vim /etc/exports

/rhel  *(rw,sync)

qw!

Start NFS services

[root@server Desktop]#service nfs restart; chkconfig nfs on
[root@base ~]# /etc/init.d/nfslock restart;chkconfig nfslock on

Show Mount

[root@server Desktop]# showmount -e 192.168.4.106
Export list for 192.168.4.106:
/rhel*

Client site configuration

To Show Mount 
[root@server Desktop]# showmount -e 192.168.4.106
Export list for 192.168.4.106:
/rhel*

To Mount Share File 
[root@server1 ~]# mount -t nfs 192.168.4.106:/rhel /harry

[root@server1 ~]# ls /harry
abc  bnd  yt
[root@server1 ~]# touch /harry/abc


[root@server1 ~]# umount /harry

No comments:

Post a Comment