Sane defaults for MongoDB on OSX?

前端 未结 3 751
野的像风
野的像风 2021-02-05 20:09

I installed MongoDB and have set it up like so:

DB path: /data/db

System-wide config file: /usr/local/mongodb/mongod.conf

launc

3条回答
  •  攒了一身酷
    2021-02-05 20:58

    On Mac I'd recommend you install mongo with homebrew which installs all programs into /usr/local. You will have the default paths:

    • config: /usr/local/etc/mongod.conf
    • data dir: /usr/local/var/mongodb
    • log: /usr/local/var/log/mongodb/mongo.log
    • plist file: /usr/local/opt/mongodb/homebrew.mxcl.mongodb.plist

    To install: brew install mongodb

    to restart mongo you do:

    launchctl stop homebrew.mxcl.mongodb
    launchctl start homebrew.mxcl.mongodb
    

提交回复
热议问题