Installation steps of MongoDB on Oracle Linux

MongoDB Community Version Installation on Oracle Linux Server

MongoDB Database Installation Steps

I will install MongoDB community edition 7.0.9 on Oracle Linux Server release 8.7 with 4.18.0-425.3.1.el8.x86_64 kernel. MongoDB only supports Oracle Linux running the Red Hat Compatible Kernel (RHCK). MongoDB does not support the Unbreakable Enterprise Kernel (UEK).


To ascertain the current default kernel configured for boot, execute the command grubby --default-kernel. For further verification of the currently running kernel, execute uname -r.

In the displayed Oracle Linux 8 instance, the default kernel set for boot is UEK, and the system is presently running UEK.

Utilize the command grubby --info=ALL | grep ^kernel to display all installed and configured kernels on your system. For additional insights into the boot configuration of each kernel within the system’s /boot directory, execute grubby --info=ALL without piping through grep.

Oracle Linux kernel names signify whether it’s RHCK or UEK, along with the system architecture. In the provided example, the suffix “el8” denotes RHCK, while “el8uek” indicates UEK.

Switch to an alternate default kernel by executing the command grubby --set-default followed by the chosen kernel. In the example provided, we are changing the default kernel to RHCK (4.18.0-425.3.1.el8.x86_64).

The modification becomes effective immediately, requiring only a system reboot.

The selected default kernel remains in effect across system reboots. Hence, upon rebooting the instance, your system will operate using the kernel you selected. Now we can add the MongoDB repository to the list of repositories and proceed to install MongoDB.

Directory / FileDescription
/etc/mongod.confConfiguration file of MongoDB [ By default localhost IP (127.0.0.1) is bind IP and 27017 is the default port ]
/var/lib/mongoData directory of MongoDB
/var/log/mongodb/mongod.logLog file of MongoDB
Files and directory will be created once the MongoDB packages are installed.

I have kept the SELinux status as disabled.

MongoDB listening port is changed to 27001.

Disable transparent hugepages and configure the maximum number of memory map areas a process may have to an upper limit.

I will create a mongodb user (insanedba) with admin privilege on test database and will create our first collection. (posts)

Hope it helps.


Discover More from Osman DİNÇ


Comments

Leave your comment