How to Install MongoDB 3.2 on CentOS 7.x and RHEL 7.x

por | 18 agosto, 2020

Step:1 Configure MongoDB 3.2 yum Repository.

In both Operating system RHEL7.x and CentOS 7.x yum repositories are kept in ‘/etc/yum.repos.d/’ directory.  Create the mongodb repository file with the name “mongodb-org.repo”.

[root@mongodb ~]# cd /etc/yum.repos.d/
[root@mongodb yum.repos.d]# vi mongodb-org.repo

[mongodb-org]

name=MongoDB 3.2 Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc

Step:2 Install MongoDB package using yum command.

To install MongoDB and its dependent packages use the below yum command.

[root@mongodb ~]# yum install mongodb-org -y

Above command will install the followings MongoDB Packages