Mongo DB on Fedora

On the Mongo DB site, there will only be instruction forĀ red hat, and if you just simply follow the instruction, obviously it won’t work.

since the instruction is relying on the variable $releaseserver to determine which of your OS level.

for Fedora it returns 24 if you are running Fedora 24, but if you check out the mongodb site, it only has 7 for Red hat.

so instead of using the variable, simply use 7 and it will be installed.

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/#install-mongodb-community-edition

  1. editĀ /etc/yum.repos.d/mongodb-org-3.2.repo
  2. add the following:
    [mongodb-org-3.2]
    name=MongoDB Repository
    baseurl=https://repo.mongodb.org/yum/redhat/7/mongodb-org/3.2/x86_64/
    gpgcheck=1
    enabled=1
    gpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc

    3. sudo dnf install mongodb-org

Leave Comment

Your email address will not be published. Required fields are marked *