How To Install MongoDB 4.2 on Fedora 32/31/30/29

MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License.

Photo by frank mckenna on Unsplash

I am currently using Fedora 32 on my machine, and ran into a bunch of issues and errors trying to get MongoDB installed on my machine.

So this is the solution I figured could help you save a lot of time.

All below commands are to fired on terminal.

Step 1: Update Your System

Best to use an update system

sudo dnf update

Step 2: Add mongo-db repositories

Add MongoDB 4 repositories to the system

This command is to be fired as a single command (in a single ⏎ enter)

cat <<EOF | sudo tee /etc/yum.repos.d/mongodb.repo
[mongodb-4.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/4.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc
EOF

Step 3: Install MongoDB on the machine

Install MongoDB on Fedora 32/31/30/29/28

sudo dnf -y install mongodb-org

Step 4: Check if mongo is successfully installed

mongo -version

If mongo is successfully installed on your system the above command must return following result.

MongoDB shell version v4.2.7
git version: 51d9fe12b5d19720e72dcd7db0f2f17dd9a19212
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
allocator: tcmalloc
modules: none
build environment:
distmod: rhel70
distarch: x86_64
target_arch: x86_64

Congrats! MongoDB is now ready to use on your local system.

Thank You!

Like My Work? How about buy me a coffee?😉

--

--

--

Computer Engineer and Tech Enthusiast

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What Are Sprint Burndown Charts And How They Prove To Be Helpful?

What is Searching ? What are the common searching algorithms ?

Tableau auth with SAML on Azure AD

Setting up my OpenFOAM Development Environment on Windows

DockerCon 2018 : Round Up

Python Made Easy: Create Your Own Python Library in 2 Minutes

From servers to functions, the serverless story

Kotlin Higher Order Functions

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yash Garudkar

Yash Garudkar

Computer Engineer and Tech Enthusiast

More from Medium

Install LAMP Stack Server on WSL (Windows 11)

Running Redis with resilience in Linux containers on Windows — Part 6

Using custom domain on Synology NAS with Dynamic IP

Stores with Dependency Injection in Vue 2 with Inversify