xxxxxxxxxx
// updated 2021
$ brew tap mongodb/brew
$ brew install mongodb-community@4.4
xxxxxxxxxx
$ brew tap mongodb/brew
$ brew install mongodb-community@5.0.6
/*TO START*/
brew services start mongo-community
/*TO STOP*/
brew services stop mongo-community
xxxxxxxxxx
command to activate mongodb through a terminal
mongod --dbpath /usr/local/var/mongodb --logpath /usr/local/var/log/mongodb/mongo.log --fork
xxxxxxxxxx
brew services start mongodb-community@4.2
#Step 3 to run as a service
xxxxxxxxxx
//Starts Mongdb server @ mongodb://127.0.0.1:27017/
brew services start mongodb-community@4.2
mongod --config /usr/local/etc/mongod.conf --fork
ps aux | grep -v grep | grep mongod
mongo
xxxxxxxxxx
Install brew using the -- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"\
brew tap mongodb/brew
brew install mongodb-community@5.0
xxxxxxxxxx
brew tap mongodb/brew
brew install mongodb-community@[version number]