Install mongodb on fedora

This page shows how to install mongodb on fedora 64 bit.

Create a new file in /etc/yum.repos.d/ called mongodb.repo

vi /etc/yum.repos.d/mongodb.repo

Add the below content and save the file

[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1

Now we are going to install mongodb. Open a command shell and copy and paste the following

sudo dnf install mongodb-org mongodb-org-server

Start mongodb

systemctl start mongod

Check if mongodb is running using

mongostat

It should output something like this

connected to: 127.0.0.1
insert query update delete getmore command flushes mapped vsize res faults locked db idx miss % qr|qw ar|aw netIn netOut conn time
*0 *0 *0 *0 0 1|0 0 80m 445m 35m 0 local:0.0% 0 0|0 0|0 62b 2k 1 13:22:00
*0 *0 *0 *0 0 1|0 0 80m 445m 35m 0 local:0.0% 0 0|0 0|0 62b 2k 1 13:22:01

Leave a Reply

Your email address will not be published. Required fields are marked *