Reseller Web Hosting

How to install mongodb in Linux cPanel Server

Please find the below article which describes about mongodb and it’s installation in centos 7 in Linux cPanel server.

MongoDB is a NoSQL database which will provide high performance, high availability and automatic scaling in Linux Reseller Hosting Server. MongoDB does not provide support for SQL [Structured Query Language] to retrieve or handling the stored data. MongoDB does not store data in tables like MySQL or PostgreSQL. Instead of that it stores data in a document structure similar to JSON.

Installation of Mongodb :

Step 1:
vi /etc/yum.repos.d/mongodb-org.repo

[mongodb-org-3.2]

name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc

Steps 2:
yum install mongodb-org

Steps 3:
service mongod start

Steps 4:
service mongod status

Steps 5:
mongostat

Steps 6:
mongo

To create New Database :

Step 1:
mongo

Step 2:
use dbname;

[Example : use exampledb;]

Step 3: To list the databases
show dbs;

Hope this will be helpful for you to install mongodb and creating the database in Linux Reseller Hosting Server.