Summary when installed on Windows10.

environment

  • Windows10
  • MongoDB: 3.4.6

Main unit installation

Download the latest version suitable for the environment from the following site
MongoDB homepage (English)

Install the downloaded msi file
If you want to install in your own location, select "Customize".

Create the following directory manually
C: \ Program Files \ MongoDB \ Server \ 3.4 \ data
C: \ Program Files \ MongoDB \ Server \ 3.4 \ logs

Add the following directory to the Windows environment variable Path
C: \ Program Files \ MongoDB \ Server \ 3.4 \ bin

Windows service registration

Create configuration file
Create "mongodb.conf" file in the following folder.
C: \ Program Files \ MongoDB \ Server \ 3.4 \ mongodb.conf

systemLog: destination: file path: C: \ Program Files \ MongoDB \ Server \ 3.4 \ logs \ mongodb.log logAppend: true storage: dbPath: C: \ Program Files \ MongoDB \ Server \ 3.4 \ data net: bindIp: 127.0. 0.1 port: 27017 setParameter: enableLocalhostAuthBypass: false

Windows service registration with Mongodb command
Open the DOS window as an administrator and execute the following command.
mongod.exe –config “C: \ Program Files \ MongoDB \ Server \ 3.4 \ mongodb.conf” –install –serviceName MongoDB
* The path to the config file must be an absolute path

Service startup

For the first time, start the service from "Control Panel-> Administrative Tools-> Services-> MongoDB". It should be executed automatically from the second start.

Privacy Preference Center