Install and Configure NFS Server

I have configured NFS correctly and workong fine. When finished, status was showing faild.
Can you please validate ?

hello @mohanraj1980,

may i know how you have configured it?
was it on the right server?

Thanks
Rahul

Below steps worked for me.
Reference link : [How to Install NFS Server and Client on RHEL Distributions]

1.## Setting Up the NFS Server

yum install -y nfs-utils nfs-utils-lib
vi /etc/exports

/web 172.16.238.10(rw,sync,no_root_squash)
/web 172.16.238.11(rw,sync,no_root_squash)
/web 172.16.238.12(rw,sync,no_root_squash)

systemctl enable nfs-server && sudo systemctl start nfs-server && sudo systemctl status nfs-server

2.## Setting Up the NFS Client in all apps server

yum install nfs-utils nfs-utils-lib

mkdir -p /var/www/app && sudo mount -t nfs 172.16.238.15:/web /var/www/app
systemctl enable nfs-server && sudo systemctl start nfs-server && sudo systemctl status nfs-server

to add permanent

vi /etc/fstab
echo 172.16.238.15:/web /var/www/app nfs defaults 0 0 > /etc/fstab

copy from jump server

scp /tmp/index.html natasha@ststor01:/tmp

to use scp we have to install open-ssh in storage server also, then scp from jump server it will work.
sudo yum install -y openssh-clients openssh

4 Likes

Cool synopsis. At the fstab step, it may be better to use an append >> as a > will overwrite the file. :slight_smile:
In the lab case, fstab is empty, which is quite fortuitous. In prod, it may be a heartbreaker.

Its not mandatory to install open-ssh you can also copy the file using sftp . It worked for me .

1 Like

For Tutorial/Solution - Content made for sole reason to help the community.