MongoDB

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

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

For 32-bit systems the baseurl to use is http://downloads-distro.mongodb.org/repo/redhat/os/i686/

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

Comments

Nothing yet..be the first to share wisdom.