Installing MongoDB
Installing MongoDB for integration with the DMK.
The following steps outline how to install MongoDB using the Optimal Flexible Architecture (OFA) approach.
Installation requirements
dnf -y install wget unzipCreate the directory structure
Create all the mandatory directories for the installation as root user.
export MONGO_BASE=/u01/app/mongodb
export MONGO_DATA_ROOT=/u02/mongodb/data
export MONGO_JOURNAL_ROOT=/u03/mongodb/journal # If you don't want to separate journal and data files, you can omit this variable.
export MONGO_LOG_ROOT=/u04/mongodb/log # Same thing
export MONGO_BACKUP_ROOT=/u90/mongodb/backup
mkdir -p $MONGO_BASE
mkdir -p $MONGO_DATA_ROOT
mkdir -p $MONGO_JOURNAL_ROOT
mkdir -p $MONGO_LOG_ROOT
mkdir -p $MONGO_BACKUP_ROOT
mkdir -p $MONGO_BASE/local
mkdir -p $MONGO_BASE/admin
mkdir -p $MONGO_BASE/etc
mkdir -p $MONGO_BASE/product
mkdir -p $MONGO_BASE/artifactsDownload MongoDB binaries
Depending on your requirements, visit the official MongoDB website to download the appropriate binaries. Select the desired edition (e.g., Community Edition), version, and platform. Be sure to choose the .tgz package and copy the corresponding download links. A .tgz installation is preferred to allow multiple versions of MongoDB on the same system.
For example, for MongoDB 8.0.16 Community Edition on RHEL 8.10, the download links are:
The MongoDB Shell and CLI Database Tools versions are independent of the MongoDB Server version.
On the server, download and extract the binaries as root:
MongoDB User Creation
Create a mongodb group and user, and grant the user ownership of the directories you just created.
You have successfully completed the MongoDB installation process.
Last updated