1, download MongoDB
Download the official website: https: //www.mongodb.com/download-center#community
The above image selection button the second
The above image directly Next
Add the path to the path of the bin, as shown below:
In the installation path to create yourself a file mongo.conf, configured as follows:
# Database path
dbpath = E: \ MongoDB \ the Data
# log output file path
logpath = E: \ MongoDB \ log \ mongo.log
# error log is in append mode
logappend = to true
# Enable log file is enabled by default
. TECHNOLOGY INFORMATION = to true
# This option can filter out some useless log information, if you need to debug use is set to false
quiet to true =
# the default port number is 27017
port = 27017
Start mongoDB service command as follows:
mongod --config "E:\mongodb\mongo.conf"
If every time the above operation, would not be cumbersome to create and start the MongoDB service in accordance with the following commands, you can manage the startup and shutdown MongoDB through the windows service mongod --config "E:\mongodb\mongo.conf" --install --serviceName "MongoDB"
net start MongoDB
执行完之后,就可以去服务里看是否有成功创建了
(有事离开本博文待更新中,给你阅读带来不便很抱歉...)