B.3. MongoDB, Installation and Setup

MongoDB is one incarnation of the NoSQL type database management systems. It is a document type DBMS. Document in casu means JSON document. MongoDB is not standardly installed on many machines, and it is not part of any of the packages we have already installed. The installation and setup is described here for Mac OSX, and for MS Windows

Mac OSX
For this I am leaning on https://github.com/mongodb/homebrew-brew#README.md Do what it says to install the latest version, and to start it as a service. In short
brew update
brew tap mongodb/brew
brew install mongodb-community
sudo mkdir -p /Users/yourownuserid/data/db
sudo chmod 777 /Users/yourownuserid/data/db
nohup mongod --dbpath=/Users/yourownuserid/data/db &
Replace yourownuserid with your own userid :) After each time you computer has been switched off you must repeat
nohup mongod --dbpath=/Users/yourownuserid/data/db &
MS Windows

Look up https://www.wdb24.com/how-to-install-mongodb-windows-10/ and follow the procedure. Takes precision. Follow the steps carefully.

Any OS
You may choose to have a hosted mongo service instead of a local installation. You could look at https://docs.mlab.com/ and create a free sandbox database. As a developer you would naturally run a local version for testing on your own machine. This should be done by running the deamon mongod. Preferably as a service, so that you don't have to think about activating it.