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 :
    1. Get in super-user mode : sudo bash
    2. Go to the bin folder: cd /bin
    3. Create a directory : mkdir -p /data/db
    4. Granted read and write access to this folder: chmod 777 /data/db
  • Execute mongo : mongod
  • Connect to the database from a new prompt: mongo