HOWTO: Install and use MongoDB @ macOS

Use MacPorts to install MongoDB:

sudo port install mongodb

Install MongoSh:

https://www.mongodb.com/docs/mongodb-shell/install/

Run MongoDB (the mongod process) manually as background process:

mongod --config /usr/local/etc/mongod.conf --fork  // Intel processors

Stop mongod running as background process: connect to mongod using mongosh, issue shutdown command.

Verify that MongoDB is running:

ps aux | grep -v grep | grep mongod

Connect and use MongoDB:

mongosh

View log file to see current status of mongod process

/usr/local/var/log/mongodb/mongo.log

https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-os-x/