Detailed steps for installing Mongodb 3.2.x under Windows system

  • 2020-06-15 10:26:11
  • OfStack

preface

MongoDB is a cross-platform, document-oriented database that provides high performance, high availability and scalability. MongoDB works on collection and documentation concepts. This article mainly introduces the steps of installing Mongodb 3.2.ES7en under Windows.

The download file

Download address is as follows: https: / / www mongodb. com/download - center # community

Download mongodb-win32-x86_64-2008ES26en-ES27en-3.2.8-ES28en.msi for the current version

The installation

Select the full mode and install it by default at: /c/Program Files/MongoDB/Server/3.2, then add the bin folder under this path to the system path path

Create folder


c:\MongoDb
c:\MongoDb\Db
c:\MongoDb\Log

Create configuration file


c:\MongoDb\MongoDb.cfg

Add Content:


systemLog:
 destination: file
 path: C:\MongoDb\Log\mongod.log
storage:
 dbPath: C:\MongoDb\Db

Add system services

Administrator privileges are required


mongod.exe --config "C:\mongodb\mongodb.cfg" --install

Tip:


2016-08-01T11:07:59.178+0800 I CONTROL [main] log file "C:\MongoDb\Log\mongod.log" exists; moved to "C:\MongoDb\Log\mongod.log.2016-08-01T03-07-59".

Start the service

Administrator privileges are also required:


net start mongodb

Tip:


The MongoDB service was started successfully.

This service is also visible to the task manager.

Start the mongo program


cmd -> mongo

You can see starting OK.

conclusion


Related articles: