Professional Documents
Culture Documents
Nfs
Nfs
What is NFS?
The NFS environment contains the following components: NFS server A system that contains the file resources to be shared with other systems on the network. NFS client A system that mounts the file resources shared over the network and presents the file resources as if they were local.
Benefits of NFS
The benefits of an NFS include: Centralized file access Common software access Easy to use
NFS works ?
A B
/var/zoom /var/zoom
/nfs /nfs
User2
User1
Requirements Packages portmap-4.0-63.i386.rpm nfs-utils-1.0.6-46.i386.rpm Port Numbers 2049 Nfsd 111 Portmap Configuration File /etc/exports Service portmap nfs Daemons nfsd mountd statd lockd
NFS Configuration
Install the package by using one of the installation methods Install the package by using one of the installation methods [root@comp1~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt [root@comp1~]# mount 192.168.0.250:/var/ftp/pub/RedHat/RPMS/ /mnt [root@comp1 ~]# cd /mnt [root@comp1 ~]# cd /mnt [root@comp1 ~]# rpm -ivh nfs* --force --aid [root@comp1 ~]# rpm -ivh nfs* --force --aid
Create directory to be shared Create directory to be shared [root@comp1~]# mkdir /var/zoom [root@comp1~]# mkdir /var/zoom
Open configuration for editing Open configuration for editing [root@comp1~]# vi /etc/exports [root@comp1~]# vi /etc/exports
/etc/exports
/var/zoom /var/zoom
192.168.0.0/255.255.255(ro,async) 192.168.0.0/255.255.255(ro,async)
NFS Server
To restart the NFS services To restart the NFS services [root@comp1 ~]# service nfs restart [root@comp1 ~]# service nfs restart
To check NFS server To check NFS server [root@comp1 ~]# showmount -e <servername or server ip> [root@comp1 ~]# showmount -e <servername or server ip>
Configuring Client
Create Mount point on client Create Mount point on client [root@comp1 ~]# mkdir /nfs [root@comp1 ~]# mkdir /nfs
Mount remote shared filesystem on local mount point Mount remote shared filesystem on local mount point [root@comp1 ~]# mount 192.168.0.253:/var/zoom /nfs [root@comp1 ~]# mount 192.168.0.253:/var/zoom /nfs [root@comp1 ~]# cd /nfs [root@comp1 ~]# cd /nfs
10