Skip to content

Install MongoDB Server

Xu Ding edited this page Apr 17, 2017 · 1 revision

OSX

Install via Homebrew

-> https://docs.mongodb.com/master/tutorial/install-mongodb-on-os-x/#install-mongodb-community-edition-with-homebrew

Run Server

  • Create a folder for db: mkdir ~/Desk/db
  • Run MongoDB server: mongod --dbpath ~/Desktop/db
  • Access MongoDB sell: mongo

Commands

If you have installed mongodb through homebrew then you can simply start mongodb through

brew services start mongodb

Then access the shell by

mongo

You can shut down your db by

brew services stop mongodb

For more options

brew info mongodb

Clone this wiki locally