8
  • I just noticed that there are two possible ways to start mongodb:

    • service mongodb start (uses /etc/mongod.conf)
    • service mongod start (uses /etc/mongodb.conf)

Can someone tell me what's the difference between the two?

I'm running mongodb 2.6.4 on Ubuntu 14.04 (64 bit)

1 Answer 1

11

I suspect you had MongoDB 2.4 installed previously.

In MongoDB 2.4 the service was called mongodb and used /etc/mongodb.conf (ref: Install MongoDB 2.4 on Ubuntu).

With MongoDB 2.6 there was an attempt to have more standard package names across Linux distributions, so the service was renamed to mongod (to reflect the actual daemon being started) and the config was changed to mongod.conf (ref: Install MongoDB 2.6 on Ubuntu).

3
  • Thanks @stennie, that helps. Let me see if I can officially find documentation about this. Commented Sep 12, 2014 at 6:00
  • The reference links are to the official documentation but if you want a more specific source the packaging changes between 2.4 and 2.6 were related to SERVER-3579.
    – Stennie
    Commented Sep 12, 2014 at 10:02
  • Seems like in Ubuntu 20.04 with mongodb 3.6.9 things have changed back to mongodb and /etc/mongodb.conf again packages.ubuntu.com/focal/database/mongodb-server Commented Aug 9, 2022 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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