aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-docs/src/pages/setup
diff options
context:
space:
mode:
authorDimitris Kavvathas <dimitris.kavvathas@sonarsource.com>2022-08-03 10:26:49 +0200
committersonartech <sonartech@sonarsource.com>2022-08-05 20:03:27 +0000
commit4d2d50a716507d02c04dfa8a5885415a8116c213 (patch)
tree7f47956fe21c865608d44f90a8e81af89d0a74aa /server/sonar-docs/src/pages/setup
parent14cf47a4180798e8f76eeaf7e297f4be96428107 (diff)
downloadsonarqube-4d2d50a716507d02c04dfa8a5885415a8116c213.tar.gz
sonarqube-4d2d50a716507d02c04dfa8a5885415a8116c213.zip
SONAR-17137 Replace JSW with WinSW for running SQ on Windows
Diffstat (limited to 'server/sonar-docs/src/pages/setup')
-rw-r--r--server/sonar-docs/src/pages/setup/install-server.md8
-rw-r--r--server/sonar-docs/src/pages/setup/operate-server.md23
-rw-r--r--server/sonar-docs/src/pages/setup/upgrading.md3
3 files changed, 25 insertions, 9 deletions
diff --git a/server/sonar-docs/src/pages/setup/install-server.md b/server/sonar-docs/src/pages/setup/install-server.md
index 0a7a5c479fa..ae5da42bd98 100644
--- a/server/sonar-docs/src/pages/setup/install-server.md
+++ b/server/sonar-docs/src/pages/setup/install-server.md
@@ -159,12 +159,20 @@ You can now browse SonarQube at _http://localhost:9000_ (the default System admi
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:
```
JAVA_CMD="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>
+```
+
### Advanced Installation Features
- Running SonarQube as a Service on [Windows](/setup/operate-server/) or [Linux](/setup/operate-server/)
diff --git a/server/sonar-docs/src/pages/setup/operate-server.md b/server/sonar-docs/src/pages/setup/operate-server.md
index 7ac9ba1a2c6..1acf1bb4f23 100644
--- a/server/sonar-docs/src/pages/setup/operate-server.md
+++ b/server/sonar-docs/src/pages/setup/operate-server.md
@@ -5,22 +5,29 @@ url: /setup/operate-server/
## Running SonarQube as a Service on Windows
-### Installing SonarQube as a service
-
-[[warning]]
-| When installing SonarQube as a service on Windows, the path to the executable should be quoted to prevent unquoted service path attacks.
+### Install or Uninstall SonarQube as a Service
```
-> sc create SonarQube binPath= "\"%SONAR_HOME%\bin\windows-x86-64\wrapper.exe\" -s \"%SONAR_HOME%\conf\wrapper.conf\""
+> %SONAR_HOME%\bin\windows-x86-64\SonarService.exe install
+> %SONAR_HOME%\bin\windows-x86-64\SonarService.exe uninstall
```
### Start or Stop the Service
```
-> "%SONAR_HOME%\bin\windows-x86-64\StartNTService.bat"
-> "%SONAR_HOME%\bin\windows-x86-64\StopNTService.bat"
+> %SONAR_HOME%\bin\windows-x86-64\SonarService.exe 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>`.
+```
+> %SONAR_HOME%\bin\windows-x86-64\SonarService.exe 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.
+
+### Service Status
+Check if the SonarQube service is running
+```
+> %SONAR_HOME%\bin\windows-x86-64\SonarService.exe status
```
-**Note:** `> "%SONAR_HOME%\bin\windows-x86-64\StopNTService.bat"` 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.
## 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 dbd50870c59..d719f90d0ca 100644
--- a/server/sonar-docs/src/pages/setup/upgrading.md
+++ b/server/sonar-docs/src/pages/setup/upgrading.md
@@ -136,7 +136,8 @@ If you use an external configuration, such as a script or Windows Service to con
- For Linux it depends how you implemented the service
- For Windows you can update your service by running:
```
-sc config SonarQube binPath= "\"$NEW_SONAR_HOME\bin\windows-x86-64\wrapper.exe\" -s \"$NEW_SONAR_HOME\conf\wrapper.conf\""
+> sc delete SonarQube
+> $NEW_SONAR_HOME\bin\windows-x86-64\SonarService.exe install
```
### Rebuilding indexes