// 以下 DB名: sonar, DB User: sonar, DB Pass: sonar で設定 # mysql -u root
mysql> CREATE DATABASE sonar; mysql> CREATE USER 'sonar'@'localhost' IDENTIFIED by 'sonar'; mysql> GRANT ALL PRIVILEGES ON sonar.* TO 'sonar'@'localhost'; mysql> FLUSH PRIVILEGES;
# Comment the embedded database and uncomment the following line to use MySQL <span style="color: #e2241a">sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true</span>
#Configure here general information about the environment, such as SonarQube DB details for example #No information about specific project should appear here
#----- MySQL sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8
#----- Global database settings sonar.jdbc.username=sonar sonar.jdbc.password=sonar
#----- Security (when 'sonar.forceAuthentication' is set to 'true') sonar.login=admin sonar.password=admin
上記設定完了後、 SonarQubeを起動します。
1 2 3 4 5 6 7 8
$ (SonarQubeパス)/bin/macosx-universal-64/sonar.sh console Running SonarQube... wrapper | --> Wrapper Started as Console wrapper | Launching a JVM... jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved. jvm 1 | jvm 1 | 2014.06.25 11:00:48 INFO Web server is started
INFO - 37/37 source files analyzed 02:37:00.544 INFO - Sensor org.sonar.plugins.csharp.squid.CSharpSquidSensor@625cb0bb done: 1476 ms 02:37:01.246 INFO - Execute decorators... 02:37:05.536 INFO - Store results in database 02:37:05.839 INFO - ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard/index/Unity:DemoApp 02:37:05.945 INFO - Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob 02:37:05.974 INFO - Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob 02:37:06.539 INFO - Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob 02:37:06.552 INFO - -> Keep one snapshot per day between 2014-05-25 and 2014-06-21 02:37:06.553 INFO - -> Keep one snapshot per week between 2013-06-23 and 2014-05-25 02:37:06.554 INFO - -> Keep one snapshot per month between 2009-06-28 and 2013-06-23 02:37:06.554 INFO - -> Delete data prior to: 2009-06-28 02:37:06.560 INFO - -> Clean AppliName [id=371] INFO: ------------------------------------------------------------------------ INFO: EXECUTION SUCCESS INFO: ------------------------------------------------------------------------ Total time: 24.508s Final Memory: 6M/87M INFO: ------------------------------------------------------------------------