TECHIES WORLD

For Techs.... Techniques.... Technologies....

CpanelLinux

How to install Mongodb in Linux server

MongoDB is a free and open-source cross-platform document-oriented database. Classified as a NoSQL database, MongoDB avoids the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas (MongoDB calls the format BSON), making the integration of data in certain types of applications easier and faster.

This tutorial explains the steps to install and configure mongodb in Centos server.

Create a new Yum repo file /etc/yum.repos.d/mongodb.repo and save the below contents

For 64 Bit:

[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1

For 32 Bit:

[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686/
gpgcheck=0
enabled=1

Then run the install command

yum install -y mongo-10gen mongo-10gen-server

Start mongod service

service mongod start

Enable mongod service to run in the start up.

chkconfig mongod on

Leave a Reply