In the older versions of SonarQube you got a dedicated InstallNTService.bat file to install the Windows Service of SonarQube. This file is no longer shipped with a current SonarQube installation. Instead, we must run SonarService.bat with the install option to run SonarQube as a Windows Service:
1 |
.\SonarService.bat install |
To remove the Windows Service, we can use the uninstall option:
1 |
.\SonarService.bat uninstall |
If we just want to check if the configuration is correct, we can run the other batch file of SonarQube:
1 |
.\StartSonar.bat |
I prefer this approach over the alternative SonarService.bat start because we get all errors right there in the terminal. SonarService may tell us that everything is OK while StartSonar points out that we run a no longer supported OpenJDK version.
Therefore, if something does not work, run StartSonar to check the configuration and use SonarService to install or uninstall the Windows Service.