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...
[…] original post here: Howto Install MongoDB on CentOS Linux and Red Hat (RHEL) Linux … Share and […]
[…] Read the rest here: Howto Install MongoDB on CentOS Linux and Red Hat (RHEL) Linux … […]
[…] See the rest here: Howto Install MongoDB on CentOS Linux and Red Hat (RHEL) Linux … […]
[…] You can follow the great step-by-step article over at If Not True Than Else blog. […]
[…] Howto Install MongoDB on CentOS Linux and Red Hat (RHEL) Linux http://www.if-not-true-then-false.com/2010/03/howto-install-mongodb-on-centos-linux-and-red-hat-rhel… […]
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.
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?
[…] more here: Install MongoDB on CentOS Linux and Red Hat (RHEL) Linux | if not … Share and […]
@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.
/etc/init.d/mongod: line 25: /etc/sysconfig/mongod: No such file or directory
Starting mongod: runuser: user mongod does not exist
same
/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?
Hi,
Everybody with following problem:
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:
And then follow this guide.
tks
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
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?
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:
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
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..
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: