Question: For our infrastructure in Stratos Datacenter, we need to serve our website code from a common/shared location that can be shared among all app nodes. To solve this, we came up with a solution to use the NFS (Network File System) server where we can store the data and mount the share among our app nodes. The dedicated NFS server will be our storage server. To accomplish this task, perform the following steps:
Install required NFS packages on storage server.
Configure storage server to act as an NFS server.
Make a NFS share /app on storage server.
Install and configure NFS client packages on all app nodes and configure them to act as NFS client.
Mount /app directory on all app nodes at /var/www/app directory (Create the directories if don't exist).
Start and enable required services.
There is an /tmp/index.html file on jump host. Copy this file on NFS server (storage server) under /app and make sure it gets replicated to all app servers in mounted location.
Please Note:- Perform the below commands based on your question server, user name & other details that might differ. So please read the task carefully before executing it.
All the Best 👍
1. At first login on storage server ssh natasha@ststor01
2. Switch to root user : sudo su -
3. Install NFS Packages & configure Up the NFS Server:
yum install -y nfs-utils nfs-utils-lib
4. Edit the /etc/exportfs file and correct the changes as per below
Note : - Mountpoint would differ so please check your task refer below video
5. Start service: systemctl enable nfs-server && systemctl start nfs-server
6. After changes exportfs -av
7. To scp (copy) index.html from Jump server need to
1. At first login to one of the App server ssh tony@stapp01
2. Switch to root user : sudo su -
3. Install NFS Packages & configure Up the NFS Server:
yum install -y nfs-utils nfs-utils-lib
4. Start service: systemctl enable nfs-server && systemctl start nfs-server
5. validate the export list by showmount -e ststor01
6. Make directory & Mount the filesystem
mkdir -p /var/www/web
Happy Learning!!!!
0 Comments