Install MongoDB

On Windows

  1. Open MongoDB Server in a web browser.
  2. Click on the link for the Windows 64-bit or 32-bit MSI for the “Production Release”.
  3. Extract MongoDB ZIP file to C:\Program Files\MongoDB
  4. Make data directory if it doesn't already exist mkdir C:\data
  5. Start MongoDB one time to verify everything is good.
    C:\Program Files\MongoDB\bin\mongod --dbpath c:\data
  6. Create MongoDB Configuration File
    echo logpath=C:\Program Files\MongoDB\mongod.log > "C:\Program Files\MongoDB\mongod.cfg"
    echo logappend=true >> "C:\Program Files\MongoDB\mongod.cfg"
    echo dbpath=C:\data >> "C:\Program Files\MongoDB\mongod.cfg"
    echo directoryperdb=true >> "C:\Program Files\MongoDB\mongod.cfg"
  7. Install as Service
    C:\Program Files\MongoDB\bin\mongod --config "C:\Program Files\MongoDB\mongod.cfg" --install
  8. On a development machine, change the service to be manual
    sc config mongodb start= demand

On Linux

FIXME