This guide is helpful in registering windows binary as service.
- If you have installed mongodb on the same machine, then create service for MongoDB as well. Please use the link below to configure MongoDB server as service on Windows.
To execute vREST Enterprise server as service, please follow the steps below:
First create a directory, say "vrest" where you will store all the vREST related files. To create a directory, execute the commands below:
Now download vREST enterprise and move it into the directory created above. After that rename vREST Enterprise binary like below:
Now download a third party tool winsw (Download winsw) which will create the windows service for us. And move this winsw.exe file to the directory created in step 1. And after that rename winsw.exe like below:
Now, create a file `vrest.xml` with the following content:
Note: If you have installed MongoDB on different machine then remove the below line from the above file `vrest.xml`:
Now open Application `Command Prompt` with `Run as Administrator` and go to the directory created in step 1 and execute the following command:
Note: the above command will register vrest enterprise binary as service in windows services which will be automatically start on boot and on failure, it will retry to restart the vREST server two times with in an interval of 10 seconds.
- Now vREST Enterprise server is registered as service in Windows services. Just go to Windows services and look for vrest service, then you may start vREST service by clicking on start link available in left hand side. For detailed information on starting/stopping windows service, please visit this third party link.