Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

To execute vREST Enterprise server as service, please follow the steps below:

  1. Create a file named vrest.service with the following content

    [Unit]
    Description=vREST
    After=network.target
    [Service]
    ExecStart=</path/to/vrest/binary/file>
    Restart=always
    User=<USER_NAME>
    Group=<GROUP_NAME>
    Environment=PATH=/usr/bin:/usr/local/bin
    WorkingDirectory=</path/to/vrest/binary/directory>
    [Install]
    WantedBy=multi-user.target

    In the above file, replace the following paths:

    1. </path/to/vrest/binary/file>

      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.

    2. <USER_NAME>

      Replace it with the user, by which you want to execute vREST Enterprise server.

    3. <GROUP_NAME>

      Replace it with the group name.

    4. </path/to/vrest/binary/directory>

      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.

  2. Now execute the following commands:

    // Copy your service file into the /etc/systemd/system
    $ mv vrest.service /etc/systemd/system
     
    // Tell systemd about the new service with
    $ systemctl daemon-reload
     
    // Start vrest service
    $ systemctl start vrest
     
    // Enable vrest service to run on boot
    $ systemctl enable vrest
     
    //See logs with
    $ journalctl -u vrest
  3. That's it.

 

  • No labels