3-tier Web Application Architecture with a single database and an NFS server as a shared files storage
- Spinned up an EC2 instance RHEL Linux 8 Operating System.
- Attached 3 EBS volumes (10GB) and created 3 logical volumes off them.
- flashed a filesystem and mounted the logical volumes.
- Installed NFS server using
sudo yum install nfs-utils -y
, and ensured the nfs-server.service runs at boot.
- An NFS server maintains a table of local physical file systems that are accessible to NFS clients. The master export table is kept in a file named /var/lib/nfs/etab and is initialized with the contents of
/etc/exports
and files under/etc/exports.d/
. Below is the contents added to the/etc/exports
file and by invokingexportfs -ar
, the master export table is initialized.
- Get the NFS server port with
rpcinfo -p | grep nfs
, have the port as well as TCP 111, UDP 111, UDP 2049 accessible on the security group attached to the server.
- Spinned up another server, installed MySQL server.
- Created a database with command
create database tooling;
and switched to this databaseuse tooling;
. - Creates a database user webaccess.