How to install MongoDB on RHEL/Centos/Fedora Server

How to install MongoDB on RHEL/Centos/Fedora Server

2 Minutes Read

Introduction to MongoDB:-

MongoDB is an open source schema less database system which provides a document-oriented data model. The prime concern was that MySQL is written using SQL queries, while MongoDB is focused on BSON (Binary JSON). It is a cross-platform NoSQL database. It is table based relational database structure in favor of json like documents with dynamic schemas, making the integration of data in certain types of applications easier and faster. MongoDB is free and open-source software.

So let’s see the steps to install mongoDB on RHEL/Centos or Fedora Server.


Installation procedure:-

Step: 1  System Login as root user. We are checking system OS type and system bit type.

 # uname –a
   # cat /etc/issue

Step: 2  Now we are creating a yum repo file .like /etc/yum.repos.d/mongodb.repo

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

For we are using as 64 bit System:

name=mongodb Repository

For we are using as 32 bit System:

name=mongodb Repository

Step:3  Now we install MongoDB client and server using Yum

       # yum install mongo mongo-server

Step:4  Now we can configure and basic setting in MongoDB Database Server

       # vi /etc/mongod.conf

Step:5  Start MongoDB Server

       # /etc/init.d/mongod start

Step:6  Start MongoDB Server on system boot time

       # chkconfig mongod on

Step:7  Test MongoDB server

# mongo
   	> use test
   	switched to db test
  	> db.test.find()
 	>{sd: 1})
	> db.test.find()
  	{ "_id" : ObjectId("4b9ef53c4f450969bb35a1a9"), "sd" : 1 }
   > db.test.update( {sd: 1}, {sd: 5})
   > db.test.find()
 	{ "_id" : ObjectId("4b9ef53c4f450969bb35a1a9"), "sd" : 5 }



MongoDB has an official driver for a variety of popular programming languages and development environments.

We at Andolasoft having vast expertise on implementing MongoDB database as backend in several cutting edge applications. We have developed many apps like OrangeGigs, SQUADZ  by using MongoDB as backend.

You can also see: How to Import csv configuration file to device’s SQLite db

Hope it will be helpful for you. I’d love to hear about your thoughts on this.
Thank you for your Interest.

, ,
Jayadev Das

Do what you do best in – that’s what I’ve always believed in and that’s what I preach. Over the past 25+ years (yup that’s my expertise ‘n’ experience in the Information Technology domain), I’ve been consulting to small, medium and large companies ‘bout Web Technologies, Mobile Future as well as on the good-and-bad of tech. Blogger, International Business Advisor, Web Technology Expert, Sales Guru, Startup Mentor, Insurance Sales Portal Expert & a Tennis Player. And top of all – a complete family man!

No Comments

Post A Comment

Exit pop up

Sad to see you leaving early...

From "Aha" to "Oh shit" we are sharing everything on our journey.
Enter your email address to stay up to date with the latest news.
Holler Box