12

I'm using Linux CentOS 5.4, I installed MongoDB now it's availabled as a Daemon and Service

When I execute service mongod start is says : [OK] --> in green as if the service started but when I try to connect to it I find it not working.

but when I try to run "mongod" from the shell normally it starts but if I closed the shell connections it stops.

how do I add it to the start up of the OS ? or how do I run it in the background ?

2 Answers 2

13

add /usr/bin/mongod to /etc/rc.local this will make it start with the startup scripts

12

I think you need to create basic init scripts to start Mongodb as daemon and create mongodb user. Detailed information can be found here: Mongo DB installation

2
  • 1
    Thanks a lot nickzam I if had enought points I would've voted up for your answer.
    – Shehabic
    Mar 18, 2012 at 0:50
  • 3
    That link is broken :/ Mar 18, 2015 at 9:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.