What's a clean way to stop mongod on Mac OS X?

后端 未结 9 1389
逝去的感伤
逝去的感伤 2020-12-12 09:28

i\'m running mongo 1.8.2 and trying to see how to cleanly shut it down on Mac.

on our ubuntu servers i can shutdown mongo cleanly from the mongo shell with:

9条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 09:56

    Check out these docs:

    http://www.mongodb.org/display/DOCS/Starting+and+Stopping+Mongo#StartingandStoppingMongo-SendingaUnixINTorTERMsignal

    If you started it in a terminal you should be ok with a ctrl + 'c' -- this will do a clean shutdown.

    However, if you are using launchctl there are specific instructions for that which will vary depending on how it was installed.

    If you are using Homebrew it would be launchctl stop homebrew.mxcl.mongodb

提交回复
热议问题