1. Configuration of environment variables
(1). System variables, environment variables, advanced system settings, computer properties, high-level systems variable->path-> new--Input MongoDB installation file path + Bin
A. For example C: \ System file \mongodb\bin
(2). Create a new DB file and configuration file
A. Create a new data file in the bin file sibling
New db file under B.data file
(3). Create a new database log
A. Create a new logs file in the bin file sibling
New Mongodb.log under B.logs file
(4). Create a startup configuration file
A. Create a new mongodb.cfg at the bin peer
The b.mongodb.cfg is written as follows:
1). Systemlog:
A.destination:file
B.path:mongodb file path +bin\logs\mongodb.log
2). Storage:
A.dbpath:mongodb file path \data\db
(5). Connection Port number 27017
1) win+r input cmd Enter
2) Enter file path +bin\mongod.exe--dbpath file path +data\db
3) 27017 default port-------------do not close cmd
4) Another open cmd run
5) Enter the file path +bin\mongo.exe-----------------The connection is successful at this time
6) Close all cmd
7) Open cmd as Administrator
A. File path +bin\mongod.exe--config file path +mongodb.cfg--install
Create a new file under the logs file
8) Administrator status cmd input net start MongoDB (Service Mount window)-------Server name cannot be written incorrectly
Administrator status cmd input net stop MongoDB shutdown service
10) If the startup error
Delete the Mongodb.lock file from the db file under the data file
MongoDB Environment Configuration and service start-up