MongoDB is NoSQL database
MongoDB is a cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc. and licensed under the Server Side Public License.
An official documentation is attached.
- Install MongoDB Community Edition on Mac
1. Install MongoDB Community Edition on Mac with Home brew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Tap the MongoDB Homebrew Tap
$ brew tap mongodb/brew
$ brew install firstname.lastname@example.org
$ brew services start email@example.com
$ brew services stop firstname.lastname@example.org
manually as a background process
$ mongod --config /usr/local/etc/mongod.conf --fork
- To stop a
mongodrunning as a background process, connect to the
mongodfrom the mongo shell, and issue the
shutdowncommand as needed.
To verify that MongoDB is running, search for
mongod in your running processes
$ ps aux | grep -v grep | grep mongod
Connect and Use MongoDB
To begin using MongoDB, connect a mongo shell to the running instance. From a new terminal, issue the following.