Wednesday, 6 November 2019

How to Install mongoDB 3.0 on CentOS release 6.5 [Step by Step Guide]

Wondering how to install mongoDB 3.0 on CentOS release 6.5?

Here's the step by step guide.

1) Configure the package management system (yum).

Create a /etc/yum.repos.d/mongodb-org-3.0.repo file so that you can install MongoDB directly, using yum.
#vi /etc/yum.repos.d/mongodb-org-3.0.repo
For this version of MongoDB Use the following repository file:
name=MongoDB Repository

2) Install the MongoDB packages and associated tools.

To install the latest stable version of MongoDB, issue the following command:
#sudo yum install -y mongodb-org
To install a specific release of MongoDB, specify each component package individually and append the version number to the package name, as in the following example:
#sudo yum install -y mongodb-org-3.0.13 mongodb-org-server-3.0.13 mongodb-org-shell-3.0.13 mongodb-org-mongos-3.0.13 mongodb-org-tools-3.0.13


3) Disable SELinux

Disable SELinux by setting the SELINUX setting to disabled in /etc/selinux/config.

You must rebbot the system for the changes to take effect.

4) Check mongod Services

#service mongod status

#service mongod start
#chkconfig mongod on

5) MongoDb logs

You can follow the state of the process for errors or important messages by watching the output in the /var/log/mongodb/mongod.log file.
# tail -f /var/log/mongodb/mongod.log
Screen Shot 2016-12-02 at 9.28.50 PM.png

If service has been started then mongodb has been installed properly else you may check mongodb error log here and troubleshoot the issue.

No comments:

Post a Comment

Post Top Ad

Your Ad Spot