Skip to content

Instantly share code, notes, and snippets.

@koolay
Last active July 5, 2016 07:13
Show Gist options
  • Save koolay/11145277 to your computer and use it in GitHub Desktop.
Save koolay/11145277 to your computer and use it in GitHub Desktop.
install mongodb as windows service
#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