Install MongoDB for Windows – Opensite - Digital Solutions Agency

0422 374 731

Install MongoDB for Windows

Last update:

Tutorials ,

Install MongoDB

  1. Go to:
  2. Locate the downloads page
  3. Download Community Server 64-bit version
  4. Run the .msi installer
  5. Choose custom install
  6. Change installation directory to “C:\MongoDB”

Configure MongoDB

Create Folders

  1. Create C:\MongoDB\data
  2. Create C:\MongoDB\data\db
  3. Create C:\MongoDB\log

Assign Folder Paths & Install MongoDB as a Service

Configure the database directory, logs directory and install MongoDB as a service.

  1. Run: Command Prompt as Admin
  2. Navigate to: C:\MongoDB\bin
mongod --directoryperdb --dbpath C:\MongoDB\data\db --logpath C:\MongoDB\log\mongo.log --logappend --rest --install

Start MongoDB

Start the service:

net start MongoDB

Enter Mongo Shell: