Last active
October 4, 2022 12:06
-
-
Save synox/7600843 to your computer and use it in GitHub Desktop.
How to install SonarQube on Raspberry PI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.6) | |
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) | |
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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not working for me. Multiple compilation errors concerning jni.h on Linux raspberrypi 4.1.13-v7+ #826 SMP PREEMPT Fri Nov 13 20:19:03 GMT 2015 armv7l GNU/Linux