Mac Installation
Lesson 2Author : GOUP
Last Updated : September, 2020
Instructions
Download using brew
- Execute the following commands
- brew update
- brew install mongodb Download the Binary
- Download MongoDB Community Server Binary
- Extract the files (double click) into the downloads folder
- I just put them at the root directory of the home folder
- Configure command line to recognize ‘mongod’ command
- echo ‘export PATH=/Users/Mike/mongodb-osx-x86_64-3.6.0/bin:$PATH’ » ~/.bashrc
Download Compass
Configure
- Create ‘/data/db’ directory
- Create this at root directory of hard-drive
- Ensure that current user has read/write permissions
- Or customize location using:
- mongod –dbpath
- I put this at the root directory of my home folder
- Create this at root directory of hard-drive
- Start MongoDB server
- mongod
- Connect to MongoDB server from client – (in new terminal window) mongo –host localhost:27017 – (in compass) use the default settings