1. Download the MongoDB installation package to the following address
https://www.mongodb.org/dl/win32/
The author of this article downloaded: mongodb-win32-x86_64-2008plus-ssl-v3.4-latest-signed.msi
Install when finished downloading
Next-> Custom, select your installation directory, create a new directory, the author of this article is installed in C:\mongodb
After successful installation, the directory is as follows:
2. New Configuration and folder directory
Add a mongodb.config configuration file under the bin path, edit and save
# #database Directorydbpath=c:\mongodb\data# #log filelogpath=c:\mongodb\log\mongodb.log
Added data and log under MongoDB, respectively, to store the information and logs, and to add a Mongodb.log file under the log path.
Run cmd as Administrator and enter the following command under the bin directory of MongoDB:
. \mongod.exe--dbpath C:\mongodb\data
Start successfully,
In the browser input address: http://localhost:27017/, display is installed successfully.
3. Configure environment variables and new services:
You can add environment variables through the following path.
To the MongoDB bin path, open the CMD window as an administrator, enter
" C:\mongodb\bin\mongodb.config " " MongoDB "
This allows us to add a MongoDB service that can be set up from startup and so on.
MongoDB installation using