diff options
author | Dimitris Kavvathas <dimitris.kavvathas@sonarsource.com> | 2022-08-09 17:34:22 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2022-08-10 20:03:08 +0000 |
commit | e12852cc16f5d328c25e6569759d0eb1ee467835 (patch) | |
tree | f7376b257f5c40f083b180c2b99fde06e5ee347e /server | |
parent | a5d505ac9b71b401691f452c69a994495c09cedb (diff) | |
download | sonarqube-e12852cc16f5d328c25e6569759d0eb1ee467835.tar.gz sonarqube-e12852cc16f5d328c25e6569759d0eb1ee467835.zip |
SONAR-17137 add SONAR_JAVA_PATH environmental variable for user-defined Java executable path
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-docs/src/pages/setup/install-server.md | 11 | ||||
-rw-r--r-- | server/sonar-docs/src/pages/setup/operate-server.md | 14 | ||||
-rw-r--r-- | server/sonar-docs/src/pages/setup/upgrading.md | 2 |
3 files changed, 13 insertions, 14 deletions
diff --git a/server/sonar-docs/src/pages/setup/install-server.md b/server/sonar-docs/src/pages/setup/install-server.md index ad817e67a5c..dc655a26fb8 100644 --- a/server/sonar-docs/src/pages/setup/install-server.md +++ b/server/sonar-docs/src/pages/setup/install-server.md @@ -157,20 +157,19 @@ You can now browse SonarQube at _http://localhost:9000_ (the default System admi ### Adjusting the Java Installation +By default, the scripts will use the Java executable available in the PATH. If there are multiple versions of Java installed on your server, you may need to explicitly define which version of Java is used. -#### Linux / macOS -To change the Java JVM used by SonarQube, edit _$SONARQUBE-HOME/bin/{platform_OS}/sonar.sh_ and update the following line: +It is possible to overwrite the default Java executable by setting the environmental variable SONAR_JAVA_PATH +#### Linux / MacOS ``` -JAVA_CMD="java" +SONAR_JAVA_PATH="path/to/java_home/bin/java" ``` #### Windows -To change the Java JVM used by SonarQube, edit > _$SONARQUBE-HOME\bin\windows-x86-64\SonarService.xml_ and update the following line: - ``` -<executable>java</executable> +SONAR_JAVA_PATH="C:\Program Files\java_home\bin\java.exe" ``` ### Advanced Installation Features diff --git a/server/sonar-docs/src/pages/setup/operate-server.md b/server/sonar-docs/src/pages/setup/operate-server.md index 1acf1bb4f23..68b50ea8f7a 100644 --- a/server/sonar-docs/src/pages/setup/operate-server.md +++ b/server/sonar-docs/src/pages/setup/operate-server.md @@ -8,25 +8,25 @@ url: /setup/operate-server/ ### Install or Uninstall SonarQube as a Service ``` -> %SONAR_HOME%\bin\windows-x86-64\SonarService.exe install -> %SONAR_HOME%\bin\windows-x86-64\SonarService.exe uninstall +> %SONAR_HOME%\bin\windows-x86-64\SonarService.bat install +> %SONAR_HOME%\bin\windows-x86-64\SonarService.bat uninstall ``` ### Start or Stop the Service ``` -> %SONAR_HOME%\bin\windows-x86-64\SonarService.exe start +> %SONAR_HOME%\bin\windows-x86-64\SonarService.bat start ``` -**Note:** By default, the service will use the Java executable available on the Windows PATH. This setting can be changed in `%SONAR_HOME%\bin\windows-x86-64\SonarService.xml`, by updating the `<executable>`. +**Note:** By default, the service will use the Java executable available on the Windows PATH. This setting can be changed by setting the environmental variable SONAR_JAVA_PATH. See more in [Adjusting the Java Installation](https://docs.sonarqube.org/latest/setup/install-server/). ``` -> %SONAR_HOME%\bin\windows-x86-64\SonarService.exe stop +> %SONAR_HOME%\bin\windows-x86-64\SonarService.bat stop ``` -**Note:** `> %SONAR_HOME%\bin\windows-x86-64\SonarService.exe stop` does a graceful shutdown where no new analysis report processing can start, but the tasks in progress are allowed to finish. The time a stop will take depends on the processing time of the tasks in progress. You'll need to kill all SonarQube processes manually to force a stop. +**Note:** `> %SONAR_HOME%\bin\windows-x86-64\SonarService.bat stop` does a graceful shutdown where no new analysis report processing can start, but the tasks in progress are allowed to finish. The time a stop will take depends on the processing time of the tasks in progress. You'll need to kill all SonarQube processes manually to force a stop. ### Service Status Check if the SonarQube service is running ``` -> %SONAR_HOME%\bin\windows-x86-64\SonarService.exe status +> %SONAR_HOME%\bin\windows-x86-64\SonarService.bat status ``` ## Running SonarQube Manually on Linux diff --git a/server/sonar-docs/src/pages/setup/upgrading.md b/server/sonar-docs/src/pages/setup/upgrading.md index d719f90d0ca..1e179ce6551 100644 --- a/server/sonar-docs/src/pages/setup/upgrading.md +++ b/server/sonar-docs/src/pages/setup/upgrading.md @@ -137,7 +137,7 @@ If you use an external configuration, such as a script or Windows Service to con - For Windows you can update your service by running: ``` > sc delete SonarQube -> $NEW_SONAR_HOME\bin\windows-x86-64\SonarService.exe install +> $NEW_SONAR_HOME\bin\windows-x86-64\SonarService.bat install ``` ### Rebuilding indexes |