Sonar is the open source code quality management platform, which integrates the software of the relevant code and unified management, integrated software as follows:
Cpd
Checkstyle
Clover
Cobertura
Findbugs
General
Google Analytics
Pmd
Squid
Surefire
I recorded the installation process.
1. The environment is prepared as follows
ubuntu8.04
jdk1.5
maven2.2 (official request 2.0.7 above)
mysql5.0
2. Download sonar, to http://sonar.codehaus.org/download the latest version, is currently 1.9.2, download after decompression can
3. Database Configuration
CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci;
grant all on sonar.* to sonar@'%' identified by 'sonar';
grant all on sonar.* to sonar@localhost identified by 'sonar';
flush privileges;
The official does not grant all on sonar.* to sonar@ '% ' identified by ' sonar '; If you want to publish the project remotely to sonar, then you need to add this one
Then also change the configuration of the sonar, open the conf/sonar.properties in the sonar extract directory, and note the following (if you do not have MySQL to change this file, sonar default to use inline database Derby)
#sonar.jdbc.url: jdbc:derby://localhost:1527/sonar;create=true
#sonar.jdbc.driverClassName: org.apache.derby.jdbc.ClientDriver
#sonar.jdbc.validationQuery: values (1)
Remove the following comment
sonar.jdbc.url: jdbc:mysql://192.168.1.151:3306/sonar? useUnicode=true&characterEncoding=utf8
sonar.jdbc.driverClassName: com.mysql.jdbc.Driver
sonar.jdbc.validationQuery: select 1