Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 36 additions & 17 deletions tech/database/mongodb/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,33 @@ description: Document-oriented and NoSQL database
order: 4
---

{% include content-deprecation.html %}

# MongoDB

MongoDB is a free and open source database and uses a document-oriented data model.

## Installation
## Security

```
# dnf install mongodb mongodb-server
# service mongod start
```
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.

References:
* [MongoDB removal from Fedora](https://fedoraproject.org/wiki/Changes/MongoDB_Removal)

## How to install a specific version
## How to install a specific upstream version

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
> 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.

Access the directory and create a file mongodb-org-*release_series*.repo
Create a file mongodb-org-*release_series*.repo

```
$ cd /etc/yum.repos.d/
$ sudo touch mongodb-org-4.4.repo
```console
$ sudo nano /etc/yum.repos.d/mongodb-org-4.4.repo
```

Insert this content inside mongodb-org-*release_series*.repo, edit if you want install another version.
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]
Expand All @@ -44,16 +45,34 @@ gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc

Now you can install with dnf

```console
$ sudo dnf install mongodb-org
```
$ sudo dnf install -y mongodb-org
```

## Run mongoDB
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](https://jira.mongodb.org/browse/SERVER-58870).

Start mongoDB service and after run mongoshell to test connection
## Enable MongoDB services

To enable and start MongoDB service run:

```console
$ sudo systemctl enable mongod.service
$ sudo systemctl start mongod.service
```

## Check MongoDB current status

```console
$ sudo systemctl status mongod.service
```
$ sudo service mongod start

## Test MongoDB connection

Run mongoshell to test the connection:

```console
$ mongo
MongoDB shell version: 4.0.0
connecting to: test
Expand Down