This article covers how to install the MongoDB database on your Fedora 35 system. In fact, MongoDB stores documents in collection. Collections are analogous to tables in relational databases. Every record in a mongoDB document, which is a data structure composed of field and pair values.
How to Run MongoDB Community Edition on Fedora ?
1. We can start MongoDB service using this command:
$ sudo systemctl start mongod
2. You can verify that the mongod process has started successfully by issuing the following command:
$ sudo systemctl status mongod
3. To make MongoDB start automatically when the system reboot, enter this command:
$ sudo systemctl enable mongod
Once we verify that our mongod process has started successfully, we can connect to MongoDB server. MongoDB provide an utility (shell) to interact with its database called mongosh.
4. To start a mongosh session on the same host machine as the MongoDB server (mongod), you can run mongosh without any command-line options: