https://strapi.io/documentation/3.0.0-beta.x/guides/databases.html#mongodb-installation
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/
Create a yum repo file so that you can install MongoDB directly using yum:
vim /etc/yum.repos.d/mongodb-org-4.4.repo
[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
sudo yum install -y mongodb-org
## note that package seemed broken, the following worked.
sudo yum install -y mongodb-org-4.4.0 mongodb-org-server-4.4.0 mongodb-org-shell-4.4.0 mongodb-org-mongos-4.4.0 mongodb-org-tools-4.4.0
sudo yum install -y mongodb-database-tools
mkdir /usr/local/data/mongo
chown mongod:mongod /usr/local/data/mongo
Then point the /etc/mongod.conf to this location
systemctl start mongod
This must be done after the installation of the Strapi so that the database backup is taken from the cloned git repository
/usr/bin/mongorestore -d cms /opt/kwantuCMS/cms/cms_master_data/cms
Install with nvm
https://itnext.io/nvm-the-easiest-way-to-switch-node-js-environments-on-your-machine-in-a-flash-17babb7d5f1b
yum group install "Development Tools"
yum install gcc gcc-c++ kernel-devel make
cd ~
mkdir ~/.git
git config credential.helper store
mkdir /opt/kwantuCMS
cd /opt/kwantuCMS
git clone https://github.com/kwantu/cms.git
cd /opt/kwantuCMS/cms/
#set the access to python executable if you get an error
npm config set python /usr/bin/python2.7
npm install
# start strapi with one of two parameters: (configuration,production)
chmod 755 build.sh
./build.sh configuration
## Setup Nginx for the requirements
http://localhost:1337/admin
firewall-cmd --add-port=1337/tcp --permanent
firewall-cmd --reload
# setup next.js
cd /opt
git clone https://github.com/kwantu/kwantuPortal.git
cd kwantuPortal/
npm install
chmod 755 build.sh
In some cases the build process of NextJs fails, because the there is some error like "> Build error occurred FetchError: request to https://netefatsacms.dalrrd.gov.za/graphql failed, reason: unable to verify the first certificate ... errno: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE', code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'"
chown -R /opt/kwantuPortal
sudo su - kwantu
nvm use v14.16.0
cd /opt/kwantuPortal
rm -rf /opt/kwantuPortal/node_modules
npm install