To install and run MongoDB on Mac OS, we install MongoDB with brew install.
We run
brew install mongodb
to install mongodb.
Then we make folder to hold the Mongo data files with
mkdir -p /data/db
Then we set permissions with
sudo chown -R `id -un` /data/db
We then run the server with
mongod
We run the Mongo command line utility with mongo.