Download the sonar installation package (6.7)
Unzip
Configuration such as configuration database
sonarqube-6.7.7/conf
4.useradd sonar passwd sonar
The user who has sonar started it or it won’t start
5. Browse 9000 after startup
6. Sonarscanner installation
Configured on the server where jenkins is located [root@iZbp1dcz9uks37fwp76tlzZ conf]# pwd /hmm/opt/sonarscanner/sonar-scanner-2.6.1/conf [root@iZbp1dcz9uks37fwp76tlzZ conf]# ll total 8 -rw-r--r-- 1 root root 307 Feb 27 16:27 sonar-scanner.properties sonar.jdbc.username=root sonar.jdbc.password=123456 ## Same as the server where sonar is located sonar.jdbc.url=jdbc:mysql://xx.xx.xx .xx:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true& useConfigs=maxPerformance sonar.sourceEncoding=UTF-8 #sonar.login=admin #sonar.password=123456 sonar.scm.disabled=true
jenkins configure sonar plugin
sonar.projectKey=Project
sonar.projectName=Project
sonar.projectVersion=v1.0.0
sonar.sources=./
sonar.language=java
sonar.sourceEncoding=UTF-8
sonar.java.binaries=./