SonarQube Installation

When installing SonarQube™, be sure to select a LTS version. Newer versions can not be ready for your production environment, so be sure the version you choose accomplish all your requirements. Please, check the official release notes to follow version changes.

1. Get SonarQube

1.1 Visit SonarQube download page.

1.2 Select the latest LTS version of SonarQube and download the zip file, in this example we will get sonarqube-8.2.0.32929.zip, to your Downloads folder

2. Extracts to C:\sonarqube

2.1 Extracts the downloaded file to C:\sonarqube\sonar-8.2.0.32929 using your preferred unzip program

3. Setup properties

3.1 Uncomment the following properties, and set the proper password

C:\sonarqube\sonar-8.2.0.32929\conf\sonar.properties
# User credentials.
sonar.jdbc.username=sonar
sonar.jdbc.password=<mypassword>

#----- PostgreSQL 8.x/9.x
sonar.jdbc.url=jdbc:postgresql://localhost/sonar

...

3.2 If you want to change the host, port or web context, uncomment and change the proper properties

C:\sonarqube\sonar-8.2.0.32929\conf\sonar.properties
# Binding IP address
#sonar.web.host=0.0.0.0

# Web context
#sonar.web.context=/sonar

# TCP port for incomming connections
#sonar.web.port=9000

...
By default, it will use the server IP (if more than one is available, the sonar.web.host property needs to be set) on port 9000 and root context.

3.3 If you want to change the default encoding, add the encoding property

C:\sonarqube\sonar-8.2.0.32929\conf\sonar.properties
...

# Source code encoding
sonar.objectscript.encode=UTF-8

...

4. Define system variables

4.1 Open system properties dialog

4.2 Select Advanced System Settings

4.3 Click on Environment Variables... button

4.4 On the Envirnoment Variable dialog, click on system variables New... button

4.5 Define the SONARQUBE_HOME variable

4.6 Accept changes and close all dialogs

5. Setup as a service

5.1 Open the Command Prompt window as administrator (run as Administrator)

5.2 Run the SonarQube service installer on the Command Prompt window

> %SONARQUBE_HOME%/bin/windows-x86-64/InstallNTService.bat

5.3 Open the Services dialog and select Properties on SonarQube service

5.4 Ensure to setup a user wich has enough privileges to run the server

5.5 Now find the PostgreSQL service name on the Services dialog

5.6 To ensure SonarQube service starts after PostgreSQL service is running, open the Command Prompt as administrator, and run the following command, using your PostgreSQL service name:

> C:\Windows\system32\sc config SonarQube depend=postgresql-x64-12.2

6. Check the service

6.1 Restart the SonarQube service

6.2 Check on your brower: http://myserver:9000

Remember to configure your firewall to allow port 9000.

1. Get SonarQube

1.1 Visit SonarQube download page

1.2 Download the latest SonarQube version

$ wget -P /tmp https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-8.2.0.32929.zip

2. Extracts to /opt/sonarqube

2.1 Extracts the downloaded file to /opt/sonarqube

$ sudo mkdir /opt/sonarqube

$ unzip /tmp/sonarqube-8.2.0.32929.zip -d /opt/sonarqube

$ ls -la /opt/sonarqube
total 12
drwxr-xr-x  3 root root 4096 Aug 25 11:24 .
drwxr-xr-x  6 root root 4096 Aug 25 11:24 ..
drwxr-xr-x 10 root root 4096 Aug 1  12:10 sonarqube-8.2.0.32929

3. Define a symbolic link to SonarQube

3.1 For easy upgrades on future it is highly recommended to create the symbolic link

$ sudo ln -s /opt/sonarqube/sonarqube-8.2.0.32929 /opt/sonarqube/sonar

4. Setup properties

4.1 Uncomment the following properties, and set the proper password

/opt/sonarqube/sonar/conf/sonar.properties
# User credentials.
sonar.jdbc.username=sonar
sonar.jdbc.password=<mypassword>

#----- PostgreSQL 8.x/9.x
#sonar.jdbc.url=jdbc:postgresql://localhost/sonar

#----- PostgreSQL 9.3 or greater
# By default the schema named "public" is used. It can be overridden with the parameter "currentSchema".
#sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube?currentSchema=sonar
sonar.jdbc.url=jdbc:postgresql://localhost/sonar

...

4.2 If you want to change the host, port or web context, uncomment and change the proper properties

/opt/sonarqube/sonar/conf/sonar.properties
# Binding IP address
#sonar.web.host=0.0.0.0

# Web context
#sonar.web.context=/sonar

# TCP port for incomming connections
#sonar.web.port=9000

...
By default, it will use the server IP (if more than one is available, the sonar.web.host property needs to be set) on port 9000 and root context.

4.3 If you want to change the default encoding, add the encoding property

C:\sonarqube\sonar-8.2.0.32929\conf\sonar.properties
...

# Source code encoding
sonar.objectscript.encode=UTF-8

...

5. Setup wrapper

5.1 Change wrapper.java.command to the absolute java path

/opt/sonarqube/sonar/conf/wrapper.conf
wrapper.java.command=/opt/java/default-jdk/bin/java
#wrapper.java.command=java
...

6. Create sonar user

6.1 Create sonar user

$ sudo useradd sonar
$ sudo chown -R sonar:sonar /opt/sonarqube

7. Elasticsearch configuration

7.1 Set Elasticsearch configuration on system startup.

/etc/sysctl.d/99-sonarqube.conf
vm.max_map_count=262144
fs.file-max=65536
After changing that value you will need to reboot the system to apply the changes.

8. Test manually

8.1 Run SonarQube as a non sudoer user

$ sudo -u sonar /opt/sonarqube/sonar/bin/linux-x86-64/sonar.sh start

8.2 Check on your brower: http://myserver:9000

Remember to configure your firewall to allow port 9000.

8.3 Stop SonarQube server manually

$ sudo -u sonar /opt/sonarqube/sonar/bin/linux-x86-64/sonar.sh stop

9. Setup as a service with systemctl

This is the recommended way for registering your SonarQube service. If your Linux distribuition does not support systemctl to manage services, then skip to the next point.

9.1 Create the service descriptor

/lib/systemd/system/sonar.service
[Unit]
Description=SonarQube service
Requires=postgresql.service
After=syslog.target network.target postgresql.service

[Service]
Type=simple
User=sonar
Group=sonar
PermissionsStartOnly=true
ExecStart=/bin/nohup /opt/java/default-jdk/bin/java -Xms128m -Xmx2048m -Djava.net.preferIPv4Stack=true -jar /opt/sonarqube/sonar/lib/sonar-application-8.2.0.32929.jar
StandardOutput=syslog
LimitNOFILE=65536
LimitNPROC=8192
TimeoutStartSec=5
Restart=always
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target

9.2 Enable the service to start at boot

$ sudo systemctl enable sonar.service

10. Setup as a service with init.d

This setup is an alternative to previous one. If you created your service using systemctl, please skip this chapter.

10.1 Copy the service base file

$ sudo cp /opt/sonarqube/sonar/bin/linux-x86-64/sonar.sh /etc/init.d/sonar

10.2 Edit the copied file and add SONAR_HOME and PLATFORM properties. Modify the other properties as shown next:

/etc/init.d/sonar
#! /bin/sh
### BEGIN INIT INFO
# Provides:          SonarQube Service
# Required-Start:    $network
# Required-Stop:     $network
# Default-Start:     3 4 5
# Default-Stop:      0 1 2 6
# Short-Description: SonarQube Service
# Description:
#
### END INIT INFO

. . .

# Home and Platform
SONAR_HOME="/opt/sonarqube/sonar"
PLATFORM="linux-x86-64"

# Wrapper
WRAPPER_CMD="${SONAR_HOME}/bin/${PLATFORM}/wrapper"
WRAPPER_CONF="${SONAR_HOME}/conf/wrapper.conf"

# Priority at which to run the wrapper.  See "man nice" for valid priorities.
#  nice is only used if a priority is specified.
PRIORITY=

# Location of the pid file.
PIDDIR="${SONAR_HOME}/.."

# If uncommented, causes the Wrapper to be shutdown using an anchor file.
#  When launched with the 'start' command, it will also ignore all INT and
#  TERM signals.
#IGNORE_SIGNALS=true

# If specified, the Wrapper will be run as the specified user.
# IMPORTANT - Make sure that the user has the required privileges to write
#  the PID file and wrapper.log files.  Failure to be able to write the log
#  file will cause the Wrapper to exit without any way to write out an error
#  message.
# NOTE - This will set the user which is used to run the Wrapper as well as
#  the JVM and is not useful in situations where a privileged resource or
#  port needs to be allocated prior to the user being changed.

RUN_AS_USER="sonar"
. . .

The header of the file is required if you want to avoid the following error when registering the service:

insserv: warning: script 'sonarqube' missing LSB tags and overrides

10.3 Register the service

$ sudo chmod 755 /etc/init.d/sonar
$ sudo update-rc.d -f sonar remove
$ sudo update-rc.d sonar defaults

11. Check the service

11.1 Restart the server to check if the service is loaded automatically on startup

$ service sonar status
● sonarqube.service - SonarQube service
   Loaded: loaded (/lib/systemd/system/sonar.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-03-22 16:52:43 CET; 6min ago
 Main PID: 1569 (java)
    Tasks: 163 (limit: 4697)
   Memory: 2.1G
   CGroup: /system.slice/sonar.service
           ├─1569 /opt/java/default-jdk/bin/java -Xms32m -Xmx32g -Djava.net.preferIPv4Stack=true -jar /opt/sonarqube/sonar/lib/sonar-application-8.2.0.32929.jar
           ├─1837 /opt/java/jdk-11.0.6/bin/java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress...
           ├─1935 /opt/java/jdk-11.0.6/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/sonarqube-8.2.0.32929/temp --add-opens=...
           └─1984 /opt/java/jdk-11.0.6/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/sonarqube-8.2.0.32929/temp --add-opens=...

Mar 22 16:52:46 myserver nohup[1569]: 2020.03.22 16:52:46 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Mar 22 16:52:47 myserver nohup[1569]: Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed...
Mar 22 16:52:47 myserver nohup[1569]: 2020.03.22 16:52:47 INFO  app[][o.e.p.PluginsService] no modules loaded
Mar 22 16:52:47 myserver nohup[1569]: 2020.03.22 16:52:47 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
Mar 22 16:52:59 myserver nohup[1569]: 2020.03.22 16:52:59 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
Mar 22 16:52:59 myserver nohup[1569]: 2020.03.22 16:52:59 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from ...
Mar 22 16:53:12 myserver nohup[1569]: 2020.03.22 16:53:12 INFO  app[][o.s.a.SchedulerImpl] Process[web] is up
Mar 22 16:53:12 myserver nohup[1569]: 2020.03.22 16:53:12 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='ce', ipcIndex=3, logFilenamePrefix=ce]] from ...
Mar 22 16:53:15 myserver nohup[1569]: 2020.03.22 16:53:15 INFO  app[][o.s.a.SchedulerImpl] Process[ce] is up
Mar 22 16:53:15 myserver nohup[1569]: 2020.03.22 16:53:15 INFO  app[][o.s.a.SchedulerImpl] SonarQube is up


   Loaded: loaded (/etc/init.d/sonarqube)
   Active: active (running) since Fri 2016-09-30 12:08:17 CET; 1min 2s ago
  Process: 560 ExecStart=/etc/init.d/sonarqube start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/sonarqube.service
           ├─ 697 /opt/sonarqube/sonar/bin/linux-x86-64/wrapper /opt/sonarqube/sonar/conf/wrapp...
           ├─ 771 /opt/java/jdk1.8.0_111/bin/java -Djava.awt.headless=true -Xms3m -Xmx32m -Djav...
           ├─1343 /opt/java/jdk1.8.0_111/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m ...
           └─2165 /opt/java/jdk1.8.0_111/jre/bin/java -Djava.awt.headless=true -Dfile.encoding...

Sep 30 12:08:16 myserver su[630]: Successful su for sonar by root
Sep 30 12:08:16 myserver su[630]: + ??? root:sonar
Sep 30 12:08:16 myserver su[630]: pam_unix(su:session): session opened for user sonar by (uid=0)
Sep 30 12:08:16 myserver sonarqube[560]: Starting SonarQube...
Sep 30 12:08:16 myserver sonarqube[560]: Removed stale pid file: /opt/sonarqube/sonar/../SonarQube.pid
Sep 30 12:08:17 myserver sonarqube[560]: Started SonarQube.
Sep 30 12:08:17 myserver su[630]: pam_unix(su:session): session closed for user sonar
Sep 30 12:08:17 myserver systemd[1]: Started LSB: SonarQube Service.

11.2 Check on your brower: http://myserver:9000

Remember to configure your firewall to allow port 9000.

1. Get SonarQube

1.1 Visit SonarQube download page

1.2 Download the latest SonarQube version

$ wget -P /tmp https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-8.2.0.32929.zip

2. Extracts to /opt/sonarqube

2.1 Extracts the downloaded file to /opt/sonarqube

$ sudo mkdir /opt/sonarqube

$ unzip /tmp/sonarqube-8.2.0.32929.zip -d /opt/sonarqube

$ ls -la /opt/sonarqube
total 12
drwxr-xr-x  3 root root 4096 Aug 25 11:24 .
drwxr-xr-x  6 root root 4096 Aug 25 11:24 ..
drwxr-xr-x 10 root root 4096 Aug 1  12:10 sonarqube-8.2.0.32929

3. Define a symbolic link to SonarQube

3.1 For easy upgrades on future it is highly recommended to create the symbolic link

$ sudo ln -s /opt/sonarqube/sonarqube-8.2.0.32929 /opt/sonarqube/sonar

4. Update database driver (only for SonarQube before 6.2)

Notice the database steps depends on your selected database and SonarQube version. In our case following steps are required for PostgreSQL and SonarQube before 6.2.

4.1 Disable existing PostgreSQL driver

$ mv /opt/sonarqube/sonar/lib/jdbc/postgresql/postgresql-9.3-1102-jdbc41.jar \
     /opt/sonarqube/sonar/lib/jdbc/postgresql/postgresql-9.3-1102-jdbc41.jar.DISABLED

4.2 Download the proper PostgreSQL JDBC driver for your installation

$ wget -P /opt/sonarqube/sonar/lib/jdbc/postgresql/ https://jdbc.postgresql.org/download/postgresql-9.4.1212.jar

5. Setup properties

5.1 Uncomment the following properties, and set the proper password

/opt/sonarqube/sonar/conf/sonar.properties
# User credentials.
sonar.jdbc.username=sonar
sonar.jdbc.password=<mypassword>

#----- PostgreSQL 8.x/9.x
#sonar.jdbc.url=jdbc:postgresql://localhost/sonar

#----- PostgreSQL 9.3 or greater
# By default the schema named "public" is used. It can be overridden with the parameter "currentSchema".
#sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube?currentSchema=sonar
sonar.jdbc.url=jdbc:postgresql://localhost/sonar

...

5.2 If you want to change the host, port or web context, uncomment and change the proper properties

/opt/sonarqube/sonar/conf/sonar.properties
# Binding IP address
#sonar.web.host=0.0.0.0

# Web context
#sonar.web.context=/sonar

# TCP port for incomming connections
#sonar.web.port=9000

...
By default, it will use the server IP (if more than one is available, the sonar.web.host property needs to be set) on port 9000 and root context.

5.3 If you want to change the default encoding, add the encoding property

C:\sonarqube\sonar-8.2.0.32929\conf\sonar.properties
...

# Source code encoding
sonar.objectscript.encode=UTF-8

...

6. Setup wrapper

6.1 Change wrapper.java.command to the absolute java path

/opt/sonarqube/sonar/conf/wrapper.conf
wrapper.java.command=/opt/java/default-jdk/bin/java
#wrapper.java.command=java
...

7. Create sonar user

7.1 Create sonar user

$ sudo useradd sonar
$ sudo chown -R sonar:sonar /opt/sonarqube

8. Elasticsearch configuration

8.1 Set Elasticsearch configuration on system startup.

/etc/sysctl.d/99-sonarqube.conf
vm.max_map_count=262144
fs.file-max=65536

9. Test manually

9.1 Run SonarQube as a non sudoer user

$ runuser -l sonar -c '/opt/sonarqube/sonar/bin/linux-x86-64/sonar.sh start'

9.2 Open port 9000

$ sudo firewall-cmd --zone=public --add-port=9000/tcp --permanent
$ sudo firewall-cmd --reload

9.3 Check on your brower: http://myserver:9000

9.4 Stop SonarQube server manually

$ runuser -l sonar -c '/opt/sonarqube/sonar/bin/linux-x86-64/sonar.sh stop'

10. Setup as a service with systemctl

This is the recommended way for registering your SonarQube service. If your Linux distribuition does not support systemctl to manage services, then skip to the next point.

10.1 Create the service descriptor

/lib/systemd/system/sonar.service
[Unit]
Description=SonarQube service
Requires=postgresql.service
After=syslog.target network.target postgresql.service

[Service]
Type=forking
User=sonar
Group=sonar
Restart=always

ExecStart=/opt/sonarqube/sonar/bin/linux-x86-64/sonar.sh start
ExecStop=/opt/sonarqube/sonar/bin/linux-x86-64/sonar.sh stop

[Install]
WantedBy=multi-user.target

10.2 Enable the service to start at boot

$ sudo systemctl start sonar

11. Setup as a service with init.d

This setup is an alternative to previous one. If you created your service using systemctl, please skip this chapter.

11.1 Copy the service base file

$ sudo cp /opt/sonarqube/sonar/bin/linux-x86-64/sonar.sh /etc/init.d/sonar

11.2 Edit the copied file and add SONAR_HOME and PLATFORM properties. Modify the other properties as shown next:

/etc/init.d/sonar
#! /bin/sh
### BEGIN INIT INFO
# Provides:          SonarQube Service
# Required-Start:    $network
# Required-Stop:     $network
# Default-Start:     3 4 5
# Default-Stop:      0 1 2 6
# Short-Description: SonarQube Service
# Description:
#
### END INIT INFO

. . .

# Home and Platform
SONAR_HOME="/opt/sonarqube/sonar"
PLATFORM="linux-x86-64"

# Wrapper
WRAPPER_CMD="${SONAR_HOME}/bin/${PLATFORM}/wrapper"
WRAPPER_CONF="${SONAR_HOME}/conf/wrapper.conf"

# Priority at which to run the wrapper.  See "man nice" for valid priorities.
#  nice is only used if a priority is specified.
PRIORITY=

# Location of the pid file.
PIDDIR="${SONAR_HOME}/.."

# If uncommented, causes the Wrapper to be shutdown using an anchor file.
#  When launched with the 'start' command, it will also ignore all INT and
#  TERM signals.
#IGNORE_SIGNALS=true

# If specified, the Wrapper will be run as the specified user.
# IMPORTANT - Make sure that the user has the required privileges to write
#  the PID file and wrapper.log files.  Failure to be able to write the log
#  file will cause the Wrapper to exit without any way to write out an error
#  message.
# NOTE - This will set the user which is used to run the Wrapper as well as
#  the JVM and is not useful in situations where a privileged resource or
#  port needs to be allocated prior to the user being changed.

RUN_AS_USER="sonar"
. . .

The header of the file is required if you want to avoid the following error when registering the service:

insserv: warning: script 'sonarqube' missing LSB tags and overrides

11.3 Register the service

$ sudo chmod 755 /etc/init.d/sonar
$ sudo update-rc.d -f sonar remove
$ sudo update-rc.d sonar defaults

12. Check the service

12.1 Restart the server to check if the service is loaded automatically on startup

$ service sonar status
● sonarqube.service - SonarQube service
   Loaded: loaded (/lib/systemd/system/sonar.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2020-03-22 16:52:43 CET; 6min ago
 Main PID: 1569 (java)
    Tasks: 163 (limit: 4697)
   Memory: 2.1G
   CGroup: /system.slice/sonar.service
           ├─1569 /opt/java/default-jdk/bin/java -Xms32m -Xmx32g -Djava.net.preferIPv4Stack=true -jar /opt/sonarqube/sonar/lib/sonar-application-8.2.0.32929.jar
           ├─1837 /opt/java/jdk-11.0.6/bin/java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress...
           ├─1935 /opt/java/jdk-11.0.6/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/sonarqube-8.2.0.32929/temp --add-opens=...
           └─1984 /opt/java/jdk-11.0.6/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/sonarqube-8.2.0.32929/temp --add-opens=...

Mar 22 16:52:46 myserver nohup[1569]: 2020.03.22 16:52:46 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Mar 22 16:52:47 myserver nohup[1569]: Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed...
Mar 22 16:52:47 myserver nohup[1569]: 2020.03.22 16:52:47 INFO  app[][o.e.p.PluginsService] no modules loaded
Mar 22 16:52:47 myserver nohup[1569]: 2020.03.22 16:52:47 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
Mar 22 16:52:59 myserver nohup[1569]: 2020.03.22 16:52:59 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
Mar 22 16:52:59 myserver nohup[1569]: 2020.03.22 16:52:59 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from ...
Mar 22 16:53:12 myserver nohup[1569]: 2020.03.22 16:53:12 INFO  app[][o.s.a.SchedulerImpl] Process[web] is up
Mar 22 16:53:12 myserver nohup[1569]: 2020.03.22 16:53:12 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='ce', ipcIndex=3, logFilenamePrefix=ce]] from ...
Mar 22 16:53:15 myserver nohup[1569]: 2020.03.22 16:53:15 INFO  app[][o.s.a.SchedulerImpl] Process[ce] is up
Mar 22 16:53:15 myserver nohup[1569]: 2020.03.22 16:53:15 INFO  app[][o.s.a.SchedulerImpl] SonarQube is up


   Loaded: loaded (/etc/init.d/sonarqube)
   Active: active (running) since Fri 2016-09-30 12:08:17 CET; 1min 2s ago
  Process: 560 ExecStart=/etc/init.d/sonarqube start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/sonarqube.service
           ├─ 697 /opt/sonarqube/sonar/bin/linux-x86-64/wrapper /opt/sonarqube/sonar/conf/wrapp...
           ├─ 771 /opt/java/jdk1.8.0_111/bin/java -Djava.awt.headless=true -Xms3m -Xmx32m -Djav...
           ├─1343 /opt/java/jdk1.8.0_111/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m ...
           └─2165 /opt/java/jdk1.8.0_111/jre/bin/java -Djava.awt.headless=true -Dfile.encoding...

Sep 30 12:08:16 myserver su[630]: Successful su for sonar by root
Sep 30 12:08:16 myserver su[630]: + ??? root:sonar
Sep 30 12:08:16 myserver su[630]: pam_unix(su:session): session opened for user sonar by (uid=0)
Sep 30 12:08:16 myserver sonarqube[560]: Starting SonarQube...
Sep 30 12:08:16 myserver sonarqube[560]: Removed stale pid file: /opt/sonarqube/sonar/../SonarQube.pid
Sep 30 12:08:17 myserver sonarqube[560]: Started SonarQube.
Sep 30 12:08:17 myserver su[630]: pam_unix(su:session): session closed for user sonar
Sep 30 12:08:17 myserver systemd[1]: Started LSB: SonarQube Service.

12.2 Check on your brower: http://myserver:9000

Remember to configure your firewall to allow port 9000.