Under Windows to install MongoDB, although there are many Raiders online, but there are a lot of pits, in order to make less mistakes in the future, hereby record.
1. Download the installation package
https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.2.1-signed.msi?_ga=1.22066811.1599532380.1422017396
The above address is faster than downloading directly from the official website. Please note that the Windows 64-bit 3.2.1 version of MongoDB is downloaded here
2. Performing the installation
Click on the installation package and go next, you know.
3. Configuration (the steps of the pit-daddy came)
For example, I install MongoDB in D:\Program files\mongodb\server\3.2 This directory, then the first to manually in this directory to create a new three folders: data, etc, logs,
And then these three directories are going to create different things under each other:
The first is to create a DB folder under Data, where all the database files are placed.
Then it is logs to create a mongolog.txt file, and then you can see all kinds of pit Dad's log.
Finally, etc to create a mongo.cfg configuration file.
The contents of the configuration file are:
4. Start MongoDB
Then open cmd with Administrator privileges , which in turn executes the following lines of command:
> F:>CD D:\Program files\mongodb\server\3.2\bin
>mongod.exe--logpath "D:\Program files\mongodb\server\3.2\logs\mongolog.txt"--logappend--dbpath "D:\Program Files\mongodb\server\3.2\data\db "--servicename" MongoDB "--servicedisplayname" MongoDB "--install
Some of the specific path configuration themselves look at the change ha.
The command line is then found to be complete without any movement.
Go to the log file to see the original also to manually start the MONGO service.
So in the execution:
net start MongoDB
MongoDB Service has started successfully.
"MongoDB" Windows installation