Install MongoDB on Linux

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
Last Updated: 17-June-2014

Post a comment


Your Comment

Email (We dont publish it)


Nothing the first to share wisdom.