-->

DEVOPSZONES

  • Recent blogs

    How To Install MongoDB 4 on RHEL 8 / CentOS 8

    How To Install MongoDB 4 on RHEL 8 / CentOS 8

    MongoDB 4


    In this guide, we will cover the steps to install MongoDB 4 on RHEL 8 / CentOS 8. MongoDB is an open source NoSQL database system written in C++ designed to ensure scalability and high performance.

    MongoDB 4 is available on MongoDB yum repository. Add the repository to your RHEL 8 server by running below commands:


     Add the repository:


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

    Install mongodb-org package.


    [root@mongodbderver ~]# yum install mongodb-org -y



    mongodb-org-mongos – This is a MongoDB Shard daemon
    mongodb-org-shell – This provides a shell to MongoDB
    mongodb-org-server – This provides MongoDB daemon mongod
    mongodb-org-tools – MongoDB tools used for export, dump, import


    Starting MongoDB

    After MongoDB successfully installed, start the MongoDB.

    $ systemctl start mongod


    Enable mongod service:


    [root@mongodbderver ~]# systemctl enable --now mongod
    [root@mongodbderver ~]# systemctl status mongod
    ● mongod.service - MongoDB Database Server
       Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
       Active: active (running) since Thu 2019-12-12


    [root@mongodbderver ~]#

    Useful MongoDB Articles:

    No comments