Nfs Configuration in RHEL7



Nfs Configuration in RHEL7
Nfs Configuration in RHEL7



 what is nfs?


NFS is a network file system where we can share a file and directories into a network. It is a network-attached storage device to allow multiple clients to share and access the files and directories.


Configuration of NFS in red hat 7

 

we have to take two machine
server=192.168.50.11
client=192.168.50.12

Note:Both the machine connected or ping each other

yum install nfs* -y
mkdir /myshare
chmod 777 /myshare
cd /myshare
touch file1 file2 file3
vim /etc/exports (it is a configuration file of nfs )
/myshare *.example.com(rw,sync) 
or
/myshare 192.168.50.0/24(rw,sync)
 
In above you can give hostname or ipaddress
systemctl enable nfs 
systemctl start nfs
firewall-cmd  --permanent --add-service={nfs,mountd,rpc-bind}
firewall-cmd  --rel
exportfs -rav



nfs configuration in client side

yum install nfs-utils -y
systemctl start nfs
systemctl enable nfs
showmount -e 192.168.50.11
mkdir /mnt/myshare
chmod 777 /mnt/myshare
vim /etc/fstab
192.168.50.11:/myshare /mnt/myshare  nfs defaults 0 0
mount -a
df -h
cd /mnt/myshare
ls
rm -rf file1
ls

Images

Nfs Configuration in RHEL7
Nfs Configuration in RHEL7

Nfs Configuration in RHEL7

<img src="nfsconfig.webp" alt=" nfsconfiguration">
Nfs Configuration in RHEL7

Nfs Configuration in RHEL7
Nfs Configuration in RHEL7

<img src="nfsconfig.webp" alt=" nfsconfiguration">
Nfs Configuration in RHEL7

Nfs Configuration in RHEL7
Nfs Configuration in RHEL7

Nfs Configuration in RHEL7
Nfs Configuration in RHEL7






Previous
Next Post »