adplus-dvertising
4.5 C
Amsterdam
angeloma
angeloma
Senior Writer and partner

How install MongoDB on Fedora 33?

- Advertisement -

Currently, NoSQL Database managers are being widely used by developers. Since it has many advantages and their projects are the most open source. And MongoDB is one of the most popular managers. So, this article is about how to install MongoDB in Fedora 33.

MongoDB allows your teams to easily organize, use and enrich data – in real time, anywhere. MongoDB is a NoSQL and document-oriented database manager. In short, instead of saving the data in the record as the SQL database, it saves them in documents with BSON format which is a binary representation of JSON.

In the world of unrelated SQL database MongoDB is perhaps the most popular, however, it can be used by very different applications that require a semi-structured data collection. On the other hand, its use in transactional systems is not recommended as MongoDB does not support transactions.

That’s why I’m going to teach you how to install MongoDB on the latest stable version of Fedora, Fedora 33.

Install MongoDB on Fedora 33

It is possible to install MongoDB on Fedora 33 through the RPM packages that can be downloaded and installed from the project’s website.

However, the most efficient method is to install from the official MongoDB repository which helps to integrate the application with the system.

So, for ease of use, install the nano text editor.

sudo dnf install nano

And edit a text file to add the MongoDB repository by adding the following content

[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
1.- Configuring the MongoDB repository
1.- Configuring the MongoDB repository

Save the changes and close the text editor.

Now you can install MongoDB on Fedora 33 by running

sudo dnf install mongodb-org

After installation, a new service is created for Fedora 33.

So, refresh the list of system daemons

sudo systemctl daemon-reload

Now start it up:

sudo systemctl start mongod

And then check the status of the service

sudo systemctl status mongod
● mongod.service - SYSV: Mongo is a scalable, document-oriented database.
     Loaded: loaded (/etc/rc.d/init.d/mongod; generated)
     Active: active (running) since Sun 2021-03-14 17:07:55 CET; 14s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 1736 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=0/SUCCESS)
      Tasks: 33 (limit: 2258)
     Memory: 58.3M
        CPU: 937ms
     CGroup: /system.slice/mongod.service
             └─1752 /usr/bin/mongod -f /etc/mongod.conf

Mar 14 17:07:54 osradar systemd[1]: Starting SYSV: Mongo is a scalable, document-oriented database....
Mar 14 17:07:54 osradar runuser[1748]: pam_unix(runuser:session): session opened for user mongod(uid=994) by (uid=0)
Mar 14 17:07:55 osradar runuser[1748]: pam_unix(runuser:session): session closed for user mongod
Mar 14 17:07:55 osradar mongod[1736]: Starting mongod: [  OK  ]
Mar 14 17:07:55 osradar systemd[1]: Started SYSV: Mongo is a scalable, document-oriented database..

Now check the version of MongoDB that you have installed

mongod -version
db version v4.4.4
Build Info: {
    "version": "4.4.4",
    "gitVersion": "8db30a63db1a9d84bdcad0c83369623f708e0397",
    "openSSLVersion": "OpenSSL 1.0.2o-fips  27 Mar 2018",
    "modules": [],
    "allocator": "tcmalloc",
    "environment": {
        "distmod": "amazon",
        "distarch": "x86_64",
        "target_arch": "x86_64"
    }
}

So, enjoy it.

Conclusion

So, MongoDB is a solution that is increasingly being taken into account by many developers worldwide. Its installation in Fedora 33 is relatively simple.

- Advertisement -

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Donate to Osradar

Latest article