MongoDB: OSX Installation

Brew Install

The easiest way I found to install MongoDb on OSX was with Brew:

  1. brew update
  2. brew install mongodb

To verify installation open a new terminal window and type:

mongod

You should see a bunch of database info scroll by.  If you don’t, make sure you opened a new terminal window when you ran that command.

Setting Up Mongo as a Daemon

I followed these instructions with great success:

https://alicoding.com/how-to-start-mongodb-automatically-when-starting-your-mac-os-x/

Verifying MongoDB is Installed

Feel free to restart your mac, and then go to terminal and do a:

ps -ax | grep mongo

It should return something like:

   83 ??         0:00.57 /usr/local/bin/mongod –dbpath /var/lib/mongodb/ –logpath /var/log/mongodb.log

Manual Start and Stop of MongoDB

To stop the MongoDB service:

launchctl unload -w ~/Library/LaunchAgents/org.mongodb.mongod.plist

To start it up again (without a restart):

mongod

 

MongoDB: OSX Installation
User Rating: 0 (0 votes)