Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Databases»MongoDB»How To Install MongoDB in Fedora 36/35

    How To Install MongoDB in Fedora 36/35

    By RahulJuly 19, 20222 Mins Read

    MongoDB is a fully flexible index support and rich queries database. It is classified as a NoSQL database program, which uses JSON-like documents with optional schemas. Similar to the relational database system, the MongoDB database also supports joins in queries.

    Advertisement

    MongoDB has released a new stable version 4.4 with lots of major enhancements. This tutorial will help you to install MongoDB 4.4 on Fedora Linux systems.

    Step 1 – Configure Repository

    The MongoDB official team provides an Yum repository for installing MongoDB on a Fedora system. Create a new configuration file with Mongodb yum repository. Edit a file in a editor:

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

    Add the below content

    [Mongodb]
    name=MongoDB Repository
    baseurl=https://repo.mongodb.org/yum/redhat/8/mongodb-org/4.4/x86_64/
    gpgcheck=1
    enabled=1
    gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
    

    Save the file and close it.

    Step 2 – Install MongoDB on Fedora

    Let’s use the DNF package manager to install the MongoDB server on the Fedora system. This will also install all required dependencies to your system.

    To install MongoDB on Fedora, type:

    sudo dnf install mongodb-org mongodb-org-server 
    

    How to Install MongoDB in Fedora Linux

    Step 3 – Start MongoDB Service

    MongoDB server has been installed on your Fedora systems. Now enable the MongoDB systemd service and start it.

    sudo systemctl enable mongod.service 
    sudo systemctl start mongod.service 
    

    Once the service is started, check the current status with the following command.

    sudo systemctl status mongod.service 
    

    How to Install MongoDB in Fedora Linux

    Step 4 – Connect to MongoDB Shell

    As you have completed the MongoDB installation on your Fedora Linux system. First of all, verify the installed MongoDB version on your system with the following command.

    mongod --version 
    
    Output:
    db version v4.4.4 Build Info: { "version": "4.4.4", "gitVersion": "8db30a63db1a9d84bdcad0c83369623f708e0397", "openSSLVersion": "OpenSSL 1.1.1k FIPS 25 Mar 2021", "modules": [], "allocator": "tcmalloc", "environment": { "distmod": "rhel80", "distarch": "x86_64", "target_arch": "x86_64" } }

    Now, connect to the MongoDB shell using the mongo command-line utility. Also, execute some test commands for checking proper working.

    mongo 
    
    > use mydb;
    
    > db.test.save({ tecadmin: 1001 })
    
    > db.test.find()
    
    { "_id" : ObjectId("60d472f31f5ba51557c8b066"), "tecadmin" : 1001 }
    

    Conclusion

    Congratulation’s You have successfully installed mongodb server on Fedora system. For practice only you may use MongoDB browser shell.

    References:
    http://docs.mongodb.org/manual/installation/

    database fedora mongodb nosql
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    How to Connect MongoDB Database in Python

    Installing MySQL 8.0 on Amazon Linux 2

    How To Install MySQL 8 on Amazon Linux 2

    (Resolved) Unknown collation: utf8mb4_unicode_520_ci

    View 6 Comments

    6 Comments

    1. APo on April 17, 2022 10:05 pm

      Many thanks

      Reply
    2. Terry Mitchell on September 25, 2021 1:44 am

      Well, that was easy!!

      Thanks!!

      Reply
    3. Antonio AO on September 15, 2020 9:30 pm

      Still working! Thanks for the post, it was just what I needed.

      Reply
    4. Ali on May 10, 2020 1:24 pm

      Still works as of May 10th, 2020! Great!

      Reply
    5. N K DINAKAR on July 27, 2018 5:39 am

      Dear Rahul,

      Thanks for your support in Linux Environment. I request you to kindly guide me step by step to create and use AD services between Centos7 Server and CentOS7 Client. Hope the needful thanks in advance

      Reply
    6. Salan Khalkho on July 11, 2018 7:45 am

      Hey Rahul, Great tutorial on installing MangoDB on a Fedora. I run a blog that’s on VPS. Since the website (kidhealthcenter.com) receives few thousands visitors per day, the error log that the file creates, grows into 20GB and more in matters of a week time.

      I would appreciate if you could provide tutorial on how to manage the space on the server and find files and folders that consumes huge amount of space and ways to clean them.

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • tail Command in Linux with Examples
    • What is a Orphan Process in Unix/Linux
    • How To Display Warning Message to Unauthorized SSH Access
    • How to Set a Custom SSH Login Banner and MOTD
    • Understanding Reverse DNS: What it is and Why it Matters?
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.