Last active
July 5, 2016 07:13
-
-
Save koolay/11145277 to your computer and use it in GitHub Desktop.
install mongodb as windows service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install as windows service | |
#---- config file: mongo.cfg ------ | |
dbpath=D:\Program Files\mongodb\data | |
logpath=D:\Program Files\mongodb\log\mongo.log | |
logappend=true | |
bind_ip = 127.0.0.1 | |
#--------------------------- | |
step 1.cmd> mongod --config "D:\Program Files\mongodb\mongo.cfg" --install | |
step 2.cmd> sc create MongoDB binPath= "\"D:\Program Files\mongodb\bin\mongod.exe\" --service --config=\"D:\Program Files\mongodb\mongo.cfg\" --directoryperdb" DisplayName= "MongoDB 2.6S tandard" start= "auto" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment