1
2
3
| CREATE DATABASE sonarqube
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
|
1
2
3
| wget -O /etc/yum.repos.d/sonar.repo http://downloads.sourceforge.net/project/sonar-pkg/rpm/sonar.repo
yum install -y sonar
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
| vim /opt/sonar/conf/sonar.properties
sonar.jdbc.username=root
sonar.jdbc.password=*****
sonar.jdbc.url=jdbc:mysql://192.168.10.xxx:3306/sonarqube?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
systemctl enable sonar.service
systemctl start sonar.service
http://192.168.10.xxx:9000/
username:admin
password:admin
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| vim /usr/share/maven/conf/settings.xml
<pluginGroups>
<pluginGroup>org.sonarsource.scanner.maven</pluginGroup>
</pluginGroups>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<sonar.host.url>
http://localhost:9000
</sonar.host.url>
</properties>
</profile>
|