- commons-daemon project. See Tomcat "bin\service.bat install" for full sample of how to use the commons-daemon project.
- Set JAVA_HOME before running this
- Make sure you're in a cmd.exe with admin privs
- tomcat\bin> service install MyApp
- Results in service called "Apache Tomcat 8.0 MyApp"
- Create a log directory
- Create a mongodb.cfg in your db root with the following content
- logpath=C:\devp\mongodb-win32-x86_64-2.2.1\log\mongo.log
- dbpath=C:\devp\mongodb-win32-x86_64-2.2.1\data\db
- Run mongod with --config and --install option (must have admin privs)
- C:\devp\mongodb-win32-x86_64-2.2.1>C:\devp\mongodb-win32-x86_64-2.2.1\bin\mongod.exe --config C:\devp\mongodb-win32-x86_64-2.2.1\mongodb.cfg --install
- > net start MongoDB
- Results in service "MongoDB"