Running SonarQube as a Service on Linux Documentation (CentOS 7)

documentation

(Mark Symons) #1

The documentation Running SonarQube as a Service on Linux was last updated August 2013 (over 5 years ago) and covers CentOS 6.2 but not CentOS 7 (specifically, no mention of systemd)

I log this under “report a bug” because CentOS 6 is now in “Maintenance updates phase” (only Security errata and select mission critical bug fixes will be released).

This is what worked for me…

sonar.service file (deployed to /usr/lib/systemd/system/)

[Unit]
Description=SonarQube service
After=syslog.target network.target

[Service]
Type=forking
    
ExecStart=/opt/sonar/bin/linux-x86-64/sonar.sh start
ExecStop=/opt/sonar/bin/linux-x86-64/sonar.sh stop

User=sonar
Group=sonar
Restart=always

[Install]
WantedBy=multi-user.target

Adjust ExecStart (etc) as necessary.

Then:

sudo systemctl start sonar
sudo systemctl enable sonar

(G Ann Campbell) #5

Hi,

Sorry for the slow response on this. We appreciate your feedback and plan to update the docs.

 
Ann