Document-oriented and NoSQL database
MongoDB is a database that uses a document-oriented data model and used to be free and open source.
Fedora has determined that the Server Side Public Licensev1 (SSPL) is not a Free Software License. Therefore, we need to drop MongoDB from Fedora or never update it again. Never updating it would bring security issues, hence we decided to remove it.
First we need configure the package management system, please note that:
DNF by default uses the global configuration file at /etc/dnf/dnf.conf and all *.repo files found under /etc/yum.repos.d. The latter is typically used for repository configuration and takes precedence over global configuration.
Create a file mongodb-org-release_series.repo
$ sudo nano /etc/yum.repos.d/mongodb-org-4.4.repo
Insert this content inside the mongodb-org-release_series.repo file, edit the release_series in the filename and the baseurl and gpgkey fields URLs if you want to install another version.
[Mongodb] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/4.4/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
Now you can install with dnf
$ sudo dnf install mongodb-org
Currently some packages do not install, however those packages do not affect the functionality of MongoDB.
Warning: MongoDB does not guarantee compatibility with Fedora Linux, so newer MongoDB server packages might fail to install. See MongoDB issue ticket SERVER-58871.
To enable and start MongoDB service run:
$ sudo systemctl enable mongod.service $ sudo systemctl start mongod.service
$ sudo systemctl status mongod.service
Run mongoshell to test the connection:
$ mongo MongoDB shell version: 4.0.0 connecting to: test
MongoDB Admin is a Cross Platform GUI.
Authors: Jarek Prokop, Kevin Kofler, Muayyad Alsadi, Sergey Ushakov, oscarPulido