Installation
You can install MongoDB with Homebrew or manually.
For more informations, I invite you to check the mongoDB installation documentation.
Manually mongoDB installation :
Download the latest mongoDB version here.
Extract files in your working directory :
tar xvf mongodb-osx-x86_64-3.0.7.tgz
- Create a folder in which data will be stored :
- Get in super-user mode :
sudo bash
- Go to the bin folder:
cd /bin
- Create a directory :
mkdir -p /data/db
- Granted read and write access to this folder:
chmod 777 /data/db
- Get in super-user mode :
- Execute mongo :
mongod
- Connect to the database from a new prompt:
mongo