Install MongoDB 2.4.4 on Fedora 18/17, CentOS/Red Hat (RHEL) 6.4/5.9 - Comment Page: 2

What is MongoDB?MongoDB (from "humongous") is a scalable, high-performance, open source, schema-free, document-oriented database. Written in C++. MongoDB bridges the gap between key-value stores (which are fast and highly scalable) and traditional RDBMS systems (which provide structured schemas and powerful queries). MongoDB is very interesting document-oriented database, because it has really awesome features: Document-oriented storage (the simplicity and power of JSON-like data schemas) Dynamic queries Full index support, extending to inner-objects and embedded arrays Query profiling Fast, in-place updates Efficient storage of binary data large objects (e.g. photos and...

35 comments on “Install MongoDB 2.4.4 on Fedora 18/17, CentOS/Red Hat (RHEL) 6.4/5.9 - Comment Page: 2

1 2
    1. Hi, i’m getting this error:

      MongoDB shell version: 1.8.1
      connecting to:
      Thu May 19 15:36:29 Error: couldn’t connect to server shell/mongo.js:81
      exception: connect failed

    2. -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 27017 -j ACCEPT

      This configuration is not working in my fedora 15. Someone clue what the problem is?

      • Hi Roberto,

        Could you post your /etc/sysconfig/iptables file content?

      • Please make sure the “accept” line is before “commit” line **AND** all “reject” lines.

    3. @colin you need to ensure that you add the chain on top of it on /etc/sysconfig/iptables config file.

      like this :

      # Firewall configuration written by system-config-firewall
      # Manual customization of this file is not recommended.
      :INPUT ACCEPT [0:0]
      :FORWARD ACCEPT [0:0]
      :OUTPUT ACCEPT [0:0]
      :RH-Firewall-1-INPUT - [0:0]
      -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
      -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 27017 -j ACCEPT

    4. Thank you for this guide. Works for me on CENTOS 6. I did not use your iptables command, as this is only accessed from the local host, so I can not confirm that working, but it looks sane.


    5. […] to share some information for those of you starting MongoDB to help save you some time. Read this blog postto get yourself up and running. Make a /data/db directory and the command below gets Mongo daemon […]

    6. Thanks! Everything worked perfectly for me on CentOS 6.2.

    7. Nice post, helped my setup thanks.

    8. Hi,

      Nice tutorial.
      But I am running into a dependency problem while running the yum installation.
      –> Processing Dependency: /bin/sh for package: mongo-10gen-server-2.4.4-mongodb_1.x86_64
      –> Finished Dependency Resolution
      mongo-10gen-server-2.4.4-mongodb_1.x86_64 from 10gen has depsolving problems
      –> Missing Dependency: /bin/sh is needed by package mongo-10gen-server-2.4.4-mongodb_1.x86_64 (10gen)
      Error: Missing Dependency: /bin/sh is needed by package mongo-10gen-server-2.4.4-mongodb_1.x86_64 (10gen)
      But I see that sh executable is already present in the /bin directory.
      Could you please help me on this?


      • Hi Deepak,

        Could you first post output of following commands:

        uname -a
        cat /etc/redhat-release
        yum repolist
        rpm -qa mongo\*
        yum list all mongo\*
        rpm -qa bash
        ls -la /bin/sh
        /bin/sh --version
    9. Hi JR,

      Please find the details below:

      $ uname -a
      Linux a26 3.5.0-32-generic #53~precise1-Ubuntu SMP Wed May 29 20:33:37 UTC 2013
      x86_64 x86_64 x86_64 GNU/Linux
      $ cat /etc/redhat-release
      cat: /etc/redhat-release: No such file or directory

      $ yum repolist
      10gen | 951 B 00:00
      10gen 90/90
      repo id repo name status
      10gen 10gen Repository enabled: 90
      repolist: 90

      $ rpm -qa mongo\*

      $ yum list all mongo\*
      Installed Packages
      mongo-10gen.x86_64 2.4.4-mongodb_1 @10gen
      Available Packages
      mongo-10gen-server.x86_64 2.4.4-mongodb_1 10gen
      mongo-10gen-unstable.x86_64 2.5.0-mongodb_1 10gen
      mongo-10gen-unstable-server.x86_64 2.5.0-mongodb_1 10gen
      mongo18-10gen.x86_64 1.8.5-mongodb_1 10gen
      mongo18-10gen-server.x86_64 1.8.5-mongodb_1 10gen
      mongo20-10gen.x86_64 2.0.8-mongodb_1 10gen
      mongo20-10gen-server.x86_64 2.0.8-mongodb_1 10gen

      $ rpm -qa bash

      $ ls -la /bin/sh
      lrwxrwxrwx 1 root root 4 Mar 29 2012 /bin/sh -> dash

      $ /bin/sh --version
      /bin/sh: 0: Illegal option --

    10. JR,

      Thanks for the help.
      I was doing a silly mistake. Got it.

      • Hi Deepak,

        Okay, nice to hear that you got it working. Btw. this is not best method install mongodb on Ubuntu.

    11. Hello, thanks for great tutorial, I tried alot of tutorials this one is simplest and easiest one.

      Let people know that I was already shut down my iptables due to I have already ddos protection so when I restarted iptables accidently everything stop working, so guys dont forget to check other iptables rules.


1 2

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.