In the previous post we have made about mongoDB, in this post we will discuss about installing mongoDB on centos / RHEL.
Before installation make sure the firewall and selinux have been turned off. If you do not know how to turn off selinux visit the following post (Disable SELinux without reboot in CentOS and RHEL and Disable SELinux without reboot in CentOS and RHEL)
After the firewall and selinux have been shut down, the installation process is ready.
The first step of mongoDB installation is to add mongoDB repository, follow these steps:
For MongoDB 3.6 repository
For MongoDB 3.4 repository
After adding mongoDB repository the next step is the installation process, follow these steps:
if you want to install mongodb specifically or not all packages you want to install, follow these steps:
wait a while until mongodb installation is complete.
to run mongoDB, you can use service and systemctl,
You can also enable mongodb to auto run at startup or when new server starts / restarts.