Tuesday, April 7, 2020

Installing MongoDB community Editiion

After Mac OS catalina update, the mongo db stopped working. now trying to reinstall, the steps are below

This time attempting to install community edition. In machine, the Xcode, So below steps really were the ones that had to be followed

brew tap mongodb/brew
brew install mongodb-community@4.2

In addition to the binaries, the install creates:

the configuration file (/usr/local/etc/mongod.conf)
the log directory path (/usr/local/var/log/mongodb)
the data directory path (/usr/local/var/mongodb)


Run MongoDB Community Edition
Follow these steps to run MongoDB Community Edition. These instructions assume that you are using the default settings.

You can run MongoDB as a macOS service using brew, or you can run MongoDB manually as a background process. It is recommended to run MongoDB as a macOS service, as doing so sets the correct system ulimit values automatically (see ulimit settings for more information).

To run MongoDB (i.e. the mongod process) as a macOS service, issue the following:

brew services start mongodb-community@4.2
To run MongoDB manually as a background process, issue the following:

mongod --config /usr/local/etc/mongod.conf --fork
Both methods use the /usr/local/etc/mongod.conf file created during the install. You can add your own MongoDB configuration options to this file as well.

To verify that MongoDB is running, search for mongod in your running processes:

ps aux | grep -v grep | grep mongod
You can also view the log file to see the current status of your mongod process: /usr/local/var/log/mongodb/mongo.log.

Connect and Use MongoDB
To begin using MongoDB, connect a mongo shell to the running instance. From a new terminal, issue the following:

mongo


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

No comments:

Post a Comment