Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

SonarQube deployment document for code quality management platform

Shulou Source: shulou.com Published: 2022-06-03 02:42:53 11月16日 Update

I. description of system software

Centos-7.6 mysql-5.7.25 jdk-1.8.0_152 apache-maven-3.6.0 sonarqube-7.5

II. Skip installation of jdk and mysql

School time, selinux, iptables, time zone, swap, openfile_limit, jdk, mysql find documents to deal with themselves

Create a sonar library and authorize it to sonar users

Third, install sonarqube

Modify the configuration file sonar.properties

Sonar.jdbc.url=jdbc:mysql://192.168.8.88:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=falsesonar.jdbc.username=sonar # mysql username sonar.jdbc.password=sonar # mysql password sonar.web.javaOpts=-Xmx512m-Xms128m-XX:+HeapDumpOnOutOfMemoryErrorsonar.web.context=/sonarsonar.web.port=9000sonar.log.level=INFOsonar.log.level.es=INFO

Startup program

> useradd sonar > chown-R sonar.sonar / usr/local/sonarqube > su-soanr > / usr/local/sonarqube/elasticsearch/bin/elasticsearch-d > / usr/local/sonarqube/bin/linux-x86-64/sonar.sh start

Check

Tail-200f / usr/local/sonarqube/logs/es.logtail-200f / usr/local/sonarqube/logs/sonar.lognetstat-lnpt | egrep "9000 | 9001 | 9200 | 9300 | 3306"

4. Integrate into maven

Add the following to the maven profile setting.xml

Org.sonarsource.scanner.mavensonartrue http://192.168.8.88:9000/sonar

Add the following to the project pom.xml

Org.sonarsource.scanner.mavensonar-maven-plugin3.6.0.1398

Pass in the sonar:sonar parameter at compile time

Mvn clean package sonar:sonar

Tags: Content file user configuration document parameter password time zone user name program system software project processing inspection compilation code platform quality quality management Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Linux MariaDB Huawei OPPO Reno