NFS SERVER CONFIGURATION
=> NFS
=> Package = nfs-utils
=> Default Port = 2049
=> Configuration file : /etc/exports
=> Steps for Configuration:
:- Install NFS Package
:- #yum intsall nfs-utils*
:- #systemctl restart nfs.service
=> Add NFS Service to firewall :
:- #firewall-cmd --zone=public --permanent --add-service=nfs
=> Add mountd service to firewall :
:- #firewall-cmd --permanent --add-service=mountd
=> Add rpc service to firewall :
:- #firewall-cmd --permanent --add-service=rpc-bind
=> Make a directory to share
:- #mkdir /nfsserver
=> Change the permission of the Directory
:- #chmod 770 /nfsserver
=> Change the Owner of the Directory
:- #chown nfsnobody:root /nfsserver/
=> Add following line to Configuration file:
:- #vi /etc/exports
/nfsserver 192.168.0.11 (rw,sync)
Save and Exit
=> Check The configuration
:- #exportfs -avr
=> Go To Client Machine <=
=> Install NFS Package on the client machine
:- #yum install nfs-utils*
=> Check the connection from Server
:- #showmount -e 192.168.0.11
=> Temporary mount:
:- mount -t nfs -o sync 192.168.0.11:/nfsserver
=> Check mount
:- #df -h
=> Permanent Mount:
:- #vi /etc/fstab
192.168.0.11:/nfsserver /media nfs default 0 0
Save and Exit
#mount a
=> Check mount
:- #df -h
Thanks..........
Comments
Post a Comment
If you have any doubts, Please let me know