Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Install MongoDB on RHEL 6.6

Martin O'Connor edited this page Mar 31, 2016 · 3 revisions

The steps are defined in the following guide:

https://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat/

The main steps are the following:

Add a yum repository for MongoDB.

First, edit this file:

vi /etc/yum.repos.d/mongodb-org-3.2.repo

and paste the following content into the file:

[mongodb-org-3.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck=0
enabled=1

Then install MongoDB:

yum install -y mongodb-org

The installation will enable the service to be automatically started when the server reboots. If you want to be sure this is the case, do the following:

chkconfig mongod on

If you want to start or stop the service, you can use the service command:

service mongod start
service mongod stop
Clone this wiki locally