MongoDB installation

Installation Of MongoDB Database Server 

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.

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

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.

Let’s install

You will have to add MongoDB repository in 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 MongoDB version so f

mongod –version

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

netstat –antup | grep 27017

Now try to access MongoDB Server,

mongo

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

Turn it from here

You can also see default databases

show dbs

YouTube Link: Install MongoDB On Linux

You’re done

Rate this article

Leave a Reply

avatar
  Subscribe  
Notify of