Installing SonarQube on raspberryPi

SonarQube does currently not support Raspberry PI.

This is a workaround. It compiles a armv6 compatible version of the java-wrapper and configures sonarqube to use it.

(Testet with Raspbian, wheezy, 3.12)

Compile java-wrapper for ARMv6
============================
Download latest version of ” wrapper_prerelease_XY.tar” from http://wrapper.tanukisoftware.com/downloads/ (for me 3.5.17 works)

wget http://wrapper.tanukisoftware.com/download/3.5.17/wrapper_prerelease_3.5.17.tar.gz

Install ant: sudo apt-get install ant
run: export ANT_HOME=/usr/share/ant

Install oracle-jdk: sudo apt-get install oracle-java7-jdk
run: JAVA_HOME=/usr/lib/jvm/jdk-7-oracle-armhf/

Un-tar source: tar -xvzf wrapper_prerelease_3.5.17.tar.gz
change to directory: cd wrapper_prerelease_3.5.17/
Build: ./build32.sh release

if everything went good, you find the wrapper-binary in the folder: dist
un-tar it: tar -xvzf wrapper-linux-armhf-32-3.5.17.tar.gz

Download and install SonarQube
=====================
Download SonarQube from: http://www.sonarqube.org/downloads/
unzip and move the directory to your desired location.

change to the bin directory, and make a copy of the linux-x86-32 as “linux-pi”
cd /path/to/sonarqube/bin
cp -r linux-x86-32/ linux-pi

Replace java-Wrapper
=======================
copy the following files from the compiled java-wrapper into the sonarqube installation

/…/dist/wrapper-linux-armhf-32-3.5.17/bin/wrapper => /path/to/sonarqube/bin/linux-pi/bin/wrapper
/…/dist/wrapper-linux-armhf-32-3.5.17/bin/wrapper => /path/to/sonarqube/bin/linux-pi/bin/wrapper
/…/dist/wrapper-linux-armhf-32-3.5.17/lib/libwrapper.so => /path/to/sonarqube/bin/linux-pi/lib/libwrapper.so
/…/dist/wrapper-linux-armhf-32-3.5.17/lib/wrapper.jar => /path/to/sonarqube/lib/wrapper-3.5.X.jar

Set Java-Version for SonarQube
================================
edit the wrapper conf: sonarqube/conf/wrapper.conf
and set the java version: wrapper.java.command=/usr/lib/jvm/jdk-7-oracle-armhf/bin/java

Start SonarQube
====================
Start and test Sonar:
sonarqube/bin/linux-pi/sonar.sh console

(on my pi this takes 5min!)

test it in the browser: http://localhost:9000

Resources
=============
Helped me compiling for raspberry: http://java-service-wrapper.996253.n3.nabble.com/Wrapper-on-Raspberry-PI-td2889.html