yum install mongodb 3.2 fails

I figured out what was my problem. It was in my yum.conf file

exclude=mongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-tools

Once I commented out this line from yum.conf, everything went fine.


You need to configure the package management system (yum).

Create a /etc/yum.repos.d/mongodb.repo file to hold the following configuration information for the MongoDB repository:

If you have a 64bit system, use the following config:

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

32bit isn't recommended for production deployments, but you may use:

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

When you install the packages, you choose whether to install the current release or a previous one. This step provides the commands for both.

To install the latest stable version of MongoDB, run:

sudo yum install mongodb-org

To install a specific release of MongoDB, specify each component package individually and append to it the version number to the package name, as in the following example that installs the 3.2.0 release:

yum install mongodb-org-3.2.0 mongodb-org-server-3.2.0 mongodb-org-shell-3.2.0 mongodb-org-mongos-3.2.0 mongodb-org-tools-3.2.0

If you are still stuck, following this carefully might be helpful.


This is a more recent version of Idos answer from Install MongoDB Community Edition on Red Hat Enterprise or CentOS Linux.

Configure the package management system (yum).

Create a /etc/yum.repos.d/mongodb.repo file so that you can install MongoDB directly, using yum.

For MongoDB 3.6

Use the following repository file:

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

For versions of MongoDB earlier than 3.6

To install the packages from an earlier release series such as 3.4, you can specify the release series in the repository configuration. For example, to restrict your system to the 3.4 release series, create a /etc/yum.repos.d/mongodb.repo file to hold the following configuration information for the MongoDB 3.4 repository:

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

You can find .repo files for each release in the repository itself. Remember that odd-numbered minor release versions (e.g. 3.5) are development versions and are unsuitable for production use.

Install the MongoDB packages.

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.6.4 mongodb-org-server-3.6.4 mongodb-org-shell-3.6.4 mongodb-org-mongos-3.6.4 mongodb-org-tools-3.6.4

When you install the packages, you choose whether to install the current release or a previous one. This step provides the commands for both.

Start MongoDB.

You can start the mongod process by issuing the following command:

sudo service mongod start

You should know that this URL https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/ is not working anymore.

Go to http://repo.mongodb.org/yum/redhat/ and download mongodb-org.repo file.

Configure the package management system (yum), copy mongodb-org.repo to /etc/yum.repos.d/, so that you can install MongoDB directly, using yum.

Install the MongoDB packages and associated tools.

sudo yum install -y mongodb-org mongodb-org-server

Unfortunatelly mongodb website documentation suggests using https://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat/, but this is wrong way.