Installing the Query service as a standalone microservice

Run the appropriate microservice installation PowerShell or Unix script to install and run the standalone microservice.

About this task

You may want to add one or more parameters (without values, acting as Booleans) or parameter-value pairs to your installation script. To do so, append them to your command line in the form --PARAMETER or --PARAMETER=VALUE, where PARAMETER is the name of the parameter, and VALUE (when using) is the value you want to set it to.

You can install the microservice in one of the following ways:
As a Windows service
Choose this option for long-term use, say on a production system. The microservice continues to run when you close the PowerShell prompt, it can be stopped and restarted from the Windows Control Panel, and it outputs its log as a file. The installation script to use is installService.ps1.
As a standalone Windows process.
Choose this option for short-term use, say on a test system. The microservice stops running when you close the PowerShell prompt and it outputs its log in the command prompt window. The installation script to use is start.ps1.
As a standalone Unix process
Choose this option if you are installing on a Unix-based operating system. The installation script to use is start.sh.

Procedure

  1. Navigate to the folder to which you copied the Query service files.
  2. On a Unix-based system, to run the microservice as a standalone process, type /bin/sh start.sh but do not yet press Enter.
  3. Alternatively, on a Windows system, open a PowerShell prompt and do one of the following:
    • To install as a Windows service, type & '.\installService.ps1' but do not yet press Enter.
    • To install as a standalone Windows process, type & '.\start.ps1' but do not yet press Enter.
  4. If you want the service to register itself as a Capability with the Discovery Service automatically, add an auto-register parameter.
  5. To specify a different default HTTP port than the default, add a server.port parameter and set it to the port number of your choice.
  6. To specify a default context path, add a server.contextPath parameter and set it to the context path of your choice (the value must start with a /).
  7. Press Enter.