2014-02-22

How to install sonarqube(sonar) on debian


- get source from www:
wget http://dist.sonar.codehaus.org/sonarqube-4.1.zip

- unzip package:
unzip sonarqube-4.1.zip

- move unzipped folder into/usr/local 
mv sonarqube-4.1 /usr/local/

- create symbolic link to operate without version number
ln -s /usr/local/sonarqube-4.1 /usr/local/sonar

- now we can operate on sonar directory name and check if it works:
/usr/local/sonar/bin/linux-x86-32/sonar.sh start

- edit configuration file:
vim /usr/local/sonar/conf/sonar.properties

-- set user and password to db and sql url:
sonar.jdbc.username=sonarqube
sonar.jdbc.password=sonarqube
sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube

- restart server
/usr/local/sonar/bin/linux-x86-32/sonar.sh restart

- implement sonar as a linux service:
sudo cp /usr/local/sonar/bin/linux-x86-32/sonar.sh /etc/init.d/sonar

- now change configuration of sonar
sudo vim /etc/init.d/sonar 

-- add home variables and reconfig command line command
SONAR_HOME=/usr/local/sonar
PLATFORM=linux-x86-32

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

PIDDIR="/var/run"

- now we can set this as a service wtihcommand (in debian):
sudo update-rc.d 

- and we can chack if it works:
sudo /etc/init.d/sonar restart
-or:
sudo service sonar restart

Brak komentarzy:

Prześlij komentarz