MongoDB is a cross-platform, document oriented database that provides, high performance, high availability, and easy scalability. MongoDB works on concept of collection and document.
Add MongoDB to Yum repo
[mongodb] name=MongoDB repo baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/ gpgcheck=0 enabled=1
Save and close the file.
Before we move on, we should verify that the MongoDB repository exists within the yum utility. The repolist command displays a list of enabled repositories:
We can install the mongodb-org package from the third-party repository using the yum utility.
yum install mongodb-org
Next, start the MongoDB service with the systemctl utility:
systemctl start mongod
The systemctl utility did not provide a result after executing the start command, but we can check that the service started by viewing the end of the mongod.log file with the cat command:
MongoDB is a threaded application. It can launch additional processes to handle its workload. The warning states that for MongoDB to be most effective the number of processes that it is authorized to spin up should be half that of the number of files that it can have open at any given time. To resolve the warning, alter the processes soft rlimit value for mongod by editing the 20-nproc.conf file:
Add the following line to the end of file:
mongod soft nproc 32000
systemctl restart mongod
type mongo on terminal
and then type following to show all databases;