Install the initial configuration of MongoDB in Win7, win7mongodb
1. Download www.mongodb.org
Ii. Installation
Decompress the package to a directory without spaces. My directory is D: \ Program Files \ MongoDB \
After Windows starts, right-click cmd.exe and choose run as Administrator (this is very important, because if the default user is not a super administrator, there is no way to install MongoDB as a service)
Switch to the installation directory \ bin directory
Enter: mongod -- logpath "D: \ Program Files \ Mongo
DB \ Server \ 3.0 \ data \ log \ MongoDB. log "-- logappend -- dbpath" D: \ Program Files \ Mongo
DB \ Server \ 3.0 \ data \ db "-- serviceName" MongoDB "-install
In this way, you can install mongoDB as a service.
Note:
1. The logpath parameter is not a directory but a log file name.
2. The directory and file in the command must exist. If not, an error is returned.
3. Start
After the command is executed, the service is established but not started. You can find it in the System Service (the service name is the corresponding parameter of serviceName ).
If not, follow the steps described in step 2 as a super administrator.