FedoraRHEL Based

How To Install MongoDB on Fedora 38

Install MongoDB on Fedora 38

In this tutorial, we will show you how to install MongoDB on Fedora 38. Are you looking to install MongoDB on your Fedora 38 system but don’t know where to start? Look no further! In this comprehensive guide, we will walk you through the step-by-step process to install and configure MongoDB on your Fedora 38 machine. MongoDB is a popular NoSQL database that provides high scalability and flexibility for managing unstructured data, making it an ideal choice for modern applications. With this guide, you’ll have a fully functional MongoDB setup up and running in no time. We’ll cover all the prerequisites, the installation process, and the necessary configurations to get MongoDB up and running on your Fedora 38 system. So, let’s dive in and get started!

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB database on a Fedora 38.


  • A server running one of the following operating systems: Fedora 38.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for MongoDB.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install MongoDB on Fedora 38

Step 1. Before proceeding, update your Fedora operating system to make sure all existing packages are up to date. Use this command to update the server packages:

sudo dnf upgrade
sudo dnf update

Step 2. Installing MongoDB on Fedora 38.

Now add the MongoDB repository to your system using the following command:

nano /etc/yum.repos.d/mongodb-org.repo

Add the below files:

name=MongoDB Repository

Next, update packages and install the latest stable version of MongoDB using the following command:

sudo dnf update
sudo dnf install mongodb-org

Once installation is complete we need to start the MongoDB server to start operating. We do that with the following command below:

sudo systemctl start mongod
sudo systemctl enable mongod

Step 3. Configure MongoDB.

Now that you have MongoDB installed on your Fedora 38 system, it’s time to configure it. open the MongoDB configuration file using the following command:

nano /etc/mongod.conf

Locate the bind IP parameter and change its value to This will allow MongoDB to listen to all IP addresses on the system.

Save the changes and exit the file, then restart the MongoDB service using the following command:

sudo systemctl restart mongod

Step 4. Configure Firewall.

If you have an active firewalld service on your server and would like MongoDB service to be accessible over the network, allow port 27017/tcp:

sudo firewall-cmd --add-port=27017/tcp --permanent
sudo firewall-cmd --reload

Congratulations! You have successfully installed MongoDB. Thanks for using this tutorial for installing the MongoDB database on your Fedora 38 system. For additional help or useful information, we recommend you check the official MongoDB website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!


r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button