To execute vREST Enterprise server as service, please follow the steps below:
Create a file named vrest.service with the following content
In the above file, replace the following paths:
Replace it with absolute path of vREST enterprise binary file. Please change the file name from vrest_linux_x_x_x to vrest_linux, so that you don't have to change the service whenever you want to upgrade / downgrade vREST Enterprise server.
Replace it with the user, by which you want to execute vREST Enterprise server.
Replace it with the group name.
Replace it with absolute path of the directory where vREST enterprise binary file resides. vREST's config.json file should also exist in this directory.
Now execute the following commands:
- That's it.
- Before starting vREST, please ensure that MongoDB server is ready to accept database connections. So,
- If you are running MongoDB on separate machine, then please ensure that MongoDB server is running before starting the vREST application.
or if you are running MongoDB on the same machine as vREST application, then you must run vrest.service after mongod.service as follows: