Install MongoDB on Linux

Posted on 17th June 2014

This chapter describes how to install MongoDB on RHEL, CentOS, Fedora and other rpm based systems.

1. Configure yum

Create a file that holds the MongoDB repository information.

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

Enter the following repository configuration to the file

name=MongoDB Repository

For 32-bit systems the baseurl to use is

2. Install Packages

Install the MongoDB packages using yum.

yum install mongodb-org

mongodb-org is a meta package that will install the packages mongodb-org-server, mongodb-org-shell, mongodb-org-mongos and mongodb-org-tools.

3. Start MongoDB

To start mongod process, run:

service mongod start

To make mongod start automatically when the system boots,

chkconfig mongod on

To stop mongod:

service mongod stop

Post a comment


Nothing the first to share wisdom.