This section provides an overview of what sonarqube is, and why a developer might want to use it.
It should also mention any large subjects within sonarqube, and link out to the related topics. Since the Documentation for sonarqube is new, you may need to create initial versions of those related topics.
Version | Release Date |
---|---|
6.4 | 2017-06-02 |
6.3 | 2017-03-14 |
6.2 | 2016-12-14 |
6.1 | 2016-10-13 |
6.0 | 2016-08-04 |
5.6 | 2016-06-08 |
5.5 | 2016-05-19 |
5.4 | 2016-04-01 |
5.3 | 2016-01-28 |
5.2 | 2015-11-26 |
5.1 | 2015-04-23 |
5.0 | 2015-01-28 |
Sonarqube uses database for storing its results and analysis. You can install MySQL for example and run it using mysql -u root -p
and then run the following queries to set up the database tables.
CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'sonar' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';
GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar';
FLUSH PRIVILEGES;
then you need to download the sonarqube from their website, for example you can use wget
to do it as shown below. Choose the appropriate sonarqube version required.
wget https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.zip
unzip sonarqube-5.6.zip
mv sonarqube-5.6 /opt/sonar
Open /opt/sonar/conf/sonar.properties with vim editor, and modify it as shown below.
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
these setup the database and the user name, password for that. To setup server on port 9000 add the below configurations
sonar.web.host=127.0.0.1
sonar.web.context=/sonar
sonar.web.port=9000
this sets up all the required configurations. now you can start the service using this command sudo /opt/sonar/bin/linux-x86-64/sonar.sh start
. replace the start keyword with stop
to shutdown the server.
for more information and configurations you can visit - http://docs.sonarqube.org/display/SONAR/Installing+the+Server