Win10 above the installation of MongoDB, be careful not to check the install MongoDB Compass, or will exit Error!!!!
- The installation of MongoDB
I am a MongoDB folder built on the e disk, used to install MongoDB.
and create it in the MongoDB folder ahead of time:
E:\mongodb\data\db (this folder is used to store the database)
E:\mongodb\logs\mongodb.log (this folder is used to store logs)
E:\mongodb\etc\mongodb.conf (config file)
Where the mongodb.conf configuration file is the following:
dbpath=E:\mongodb\data\dblogpath=E:\mongodb\logs\mongodb.loglogappend=true
The first step is to configure the environment variable, go to the MongoDB bin directory, copy the address
Second, this is also a key step, win10 not directly into the cmd command, due to the WIN10 system, we'd better open the developer mode. Then win +x has the administrator way into the cmd window: (This is the reason why you can not install MongoDB service, because the target computer actively refused to connect the –mongodb connection error resolution)
The third step, enter the following command
mongod --dbpath =E:\mongodb\data\db --logpath=E:\mongodb\logs\mongodb.log --install --serviceName "MongoDB"
Subject to the actual installation directory location of the individual. Be sure to run this command as an administrator. That's why the target computer is actively refusing to connect –mongodb.
After running the above command. We can run
start MongoDB
Finally we come into:
This has been successfully configured under WIN10. Remember win + x go to admin command prompt OH
Win10 Installing MongoDB