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

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: 1

1 2
    1. […] original post here: Howto Install MongoDB on CentOS Linux and Red Hat (RHEL) Linux … Share and […]

      Reply
    2. […] Read the rest here: Howto Install MongoDB on CentOS Linux and Red Hat (RHEL) Linux … […]

      Reply
    3. […] See the rest here: Howto Install MongoDB on CentOS Linux and Red Hat (RHEL) Linux … […]

      Reply
    4. […] You can follow the great step-by-step article over at If Not True Than Else blog. […]

      Reply
    5. I followed these instructions exactly, no errors or warnings from any of the commands, but the file /etc/sysconfig/mongod was never created. Do I need to create it manually? If so, what should the contents be? Thanks.

      Reply
      • Hi Mark,

        The /etc/sysconfig/mongod file should not be created.

        You possibly mean or try to find /etc/sysconfig/iptables, /etc/mongod.conf or /etc/init.d/mongod file?

        Reply
    6. […] more here: Install MongoDB on CentOS Linux and Red Hat (RHEL) Linux | if not … Share and […]

      Reply
    7. @JR/Mark The issue he referes to is this:

      [[email protected] ~]# service mongod start
      /etc/init.d/mongod: line 24: /etc/sysconfig/mongod: No such file or directory
      Starting mongod: warning: some regex utf8 things will not work. pcre build doesn’t have –enable-unicode-properties
      forked process: 13626
      all output going to: /var/log/mongo/mongod.log
      [[email protected] ~]# [ OK ]

      Though it seems to start okay.

      Reply
    8. /etc/init.d/mongod: line 25: /etc/sysconfig/mongod: No such file or directory
      Starting mongod: runuser: user mongod does not exist

      same

      Reply
    9. /etc/init.d/mongod: line 25: /etc/sysconfig/mongod: No such file or directory
      Starting mongod: runuser: user mongod does not exist

      get this error on service mongod start

      PLEASE HELP?

      Reply
    10. Hi,

      Everybody with following problem:

      
      /etc/init.d/mongod: line 25: /etc/sysconfig/mongod: No such file or directory
      Starting mongod: runuser: user mongod does not exist
      

      Old repositories caused this problem (they worked nice with 1.2.x versions, but not with 1.4.x versions and now this guide installs 1.6.x version), I updated this guide to use MongoDB own repositories and now I tested this new installation method on different systems and it worked smoothly.

      So if you have old packages installed then simply remove them, with following command:

      
      yum remove mongo mongo-server
      

      And then follow this guide.

      Reply
    11. Thanks so much for this guide. I was really stuggling to install mongodb on centos5.5 until I followed these instruction. Amazing! Works great! Persistent connection that autostarts on server reboot – fantastic!

      Only one thing – on the last step (4.2) I get this:

      Flushing firewall rules: [ OK ]
      Setting chains to policy ACCEPT: mangle filter nat [ OK ]
      Unloading iptables modules: [ OK ]
      Applying iptables firewall rules: iptables-restore: line 1 failed [FAILED]

      Is this a problem? I added the line exactly as shown “-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 27017 -j ACCEPT”

      Thanks

      Reply
    12. Thanks for this guide. It was very helpful. Just one thing.. I run whm/cpanel on my server and mongodb was throwing errors about memory all over the place. I managed to sort this by disabling “Shell Fork Bomb Protection”.

      I was wondering if there is a way to enable fork bomb protection and keep mongo happy?

      Reply
      • Hi Marc,

        I’m not sure is it possible to use “Shell Fork Bomb Protection” simultaneously with MongoDB, but maybe you could use /etc/security/limits.conf file to limit certain users or groups processes, like following:

        
                    
        someuser        hard    nproc     20
        @somegroup      hard    nproc     15
        
        Reply
    13. you might want to modify your /etc/init.d/mongod script as follows, to avoid mongod not being able to start if you have a different dbpath location in your config file:

      add these two lines towards the top of the /etc/init.d/mongod file:

      MONGO_DBPATH=`grep ‘^dbpath’ /etc/mongod.conf | cut -d’=’ -f2` # get dbpath from config
      MONGO_LOCKFILE=”$MONGO_DBPATH/mongod.lock”

      replace the line containing “killproc” with:

      killproc -p $MONGO_LOCKFILE -t30 -TERM /usr/bin/mongod

      Reply
      • hi tilo,

        Good Afternoon, when I used your instruction then after I restart mongod or check status I got this message. See below
        [[email protected] ~]# service mongod status
        cut: the delimiter must be a single character
        Try `cut –help’ for more information.
        [[email protected] ~]# /etc/init.d/mongod start
        cut: the delimiter must be a single character
        Try `cut –help’ for more information.
        Starting mongod: [ OK ]
        forked process: 22975

        please help thanks a lot..

        Reply
        • Hi Karl,

          I’m not Tilo and if you check Tilo’s comment time, I think that he’s not answering your question very soon.

          But yes, I’m not huge fan of custom hacks to init scripts, but I think that you just have “wrong” single quotes on you config, it should be:

          
          MONGO_DBPATH=`grep '^dbpath' /etc/mongod.conf | cut -d'=' -f2`
          
          Reply
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.

Close