Nfs
Nfs
NFS enables you to mount a file system on a remote computer as if it were local to
your own system. you can then directly access any of the files on the remote
filesystem. this has the advantage of allowing different systems on a network to
access the same files directly without each having to keep its own copy. only one
copy would be on a remote file system, which each computer could then access.
NFS Daemons-:
NFS operates over a TCP/IP network. the remote computer that holds the file system
makes it available to other computers on the network. it does so by exporting the
file system, which entails making entries in an NFS configuration file called
/etc/exports, as well as by running several daemons to supports access by other
systems. these include "rpc.mountd, rpc.nfsd, and rpc.portmapper". access to your
NFS server can be controlled by the /etc/hosts.allow and /etc/hosts.deny files. the
NFS daemons are listed here.
1. rpc.nfsd-: receives NFS requests form remote systems and translates them into
requests for the local system.
6. rpc.lockd-: handles lock recovery for the systems that have gone down.
configuring NFS
first check the RPM
#rpm -q nfs-utils
install the RPM
#yum install system-config-nfs.noarch
server setting
first make the folder which you want to share
#mkdir /share
#cd /share
#touch a1 a2 a3
#chmod o+w a1 a2 a3
now open the configuration file
#vi /etc/exports
making the following entry
/share 172.24.0.0/255.255.0.0(rw,sync)
save and exit
client setting
mount the /share directory on client machine.
#mount 172.24.254.254:/share /mnt
where /mnt is a mount point.
if we give a space between the network range and (rw,sync), then it will mount for
everyone.
#vi /etc/exports
/share 172.24.0.0/255.255.0.0 (rw,sync)