Created
November 25, 2016 08:35
-
-
Save CGaskell/aaa92cb95bbff23391e4b1de32d2dd45 to your computer and use it in GitHub Desktop.
Quick script to create a windows servuice to run Mongo. Paths will need reviewing per install
This file contains hidden or 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
--rmdir /s D:\MongoDB\Data | |
mkdir D:\MongoDB\Data\db | |
mkdir D:\MongoDB\Data\log | |
copy mongod.conf "D:\MongoDB\" | |
sc.exe delete MongoDB | |
sc.exe create MongoDB binPath= "\"%PROGRAMFILES%\MongoDB\Server\3.0\bin\mongod.exe\" --service --config=\"D:\MongoDB\mongod.conf\"" DisplayName= "MongoDB" start= "auto" | |
net start MongoDB | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment