====== Install MongoDB ======
===== On Windows =====
- Open [[http://www.mongodb.org/downloads|MongoDB Server]] in a web browser.
- Click on the link for the Windows 64-bit or 32-bit MSI for the "Production Release".
- Extract MongoDB ZIP file to ''C:\Program Files\MongoDB''
- Make data directory if it doesn't already exist ''mkdir C:\data''
- Start MongoDB one time to verify everything is good.
C:\Program Files\MongoDB\bin\mongod --dbpath c:\data
- 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"
- Install as Service
C:\Program Files\MongoDB\bin\mongod --config "C:\Program Files\MongoDB\mongod.cfg" --install
- On a development machine, change the service to be manual
sc config mongodb start= demand
==== On Linux ====
FIXME