Installation of MongoDB Database Server On Redhat/CentOS 7

The installation of MongoDB Database is an open-source cross-platform documented-oriented database program. It stores the data in JSON like documents with the dynamic schema. Other database stores the data in table and rows. We can install MongoDB using the terminal on Linux centos.

Check Out: How To Check Users In Mysql Database Server In Linux

Features of MongoDB Database: so f

  • Provides high performance
  • Load balancing
  • Duplication of data
  • Replication
  • Indexing
  • Supports map-reduce and aggregation tools so f

Installation of MongoDB Database Server:

Default port number is 27017 and the main configuration file is at /etc/mangod.conf

MongoDB provides supported Packages in their own repository, so f

  1. Mongodb-org-server = keeps mongod daemon and associated 
    configuration files & init scripts
  2. Mongodb-org-mongos = contains mongos daemon
  3. Mongodb-org-shell = Contains mongo shell
  4. Mongodb-org-tools = Contains mongodb tools like exports, dump, start, 
    restore and more.

Check Out: How To Install NPM, NodeJS, and Angular On Linux

Let’s install

You will have to add MongoDB repository to your system.

You can manually download the Packages from here Download

vim /etc/yum.repos.d/mongo-repo

yum install mongodb-org –y

Now start the service, so f

systemctl start mongod

Now Set The Selinux, I would recommend disabling SELinux but if you do not want to keep it enable then run below command. so f

semanage port -a -t mongod_port_t -p tcp 27017

Check Out: Install and Configure S3CMD Tool For Data Sync On S3 Bucket

Check MongoDB version so f

mongod –version

mongodb install using the repository

Check if it’s listening on the port. so f

netstat –antup | grep 27017

 step to install mongodb on linux

Now try to access MongoDB Server,


install mongodb

If you face any authorization issue, edit the file /etc/mongod.conf

Check Out:  How to Enable QR Code Generator On Microsoft Edge Browser

Turn it from here

mongodb on linux

You can also see the default and all databases.

show dbs

install mongodb linux terminal

YouTube Link: Install MongoDB On Linux

You’re done install mongodb linux centos terminal 

Share on:

Other Posts You May Like...

Leave a comment