标签:
export SONAR_HOME=/home/huey/huey/sonar/sonarqube-5.0.1 export SONAR_RUNNER_HOME=/home/huey/huey/sonar/sonar-runner-2.4 export PATH=${SONAR_RUNNER_HOME}/bin:$PATH
CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE USER ‘sonar‘ IDENTIFIED BY ‘sonar‘; GRANT ALL ON sonar.* TO ‘sonar‘@‘%‘ IDENTIFIED BY ‘sonar‘; GRANT ALL ON sonar.* TO ‘sonar‘@‘localhost‘ IDENTIFIED BY ‘sonar‘; FLUSH PRIVILEGES;
在创建数据库与用户后, 修改 sonar.properties 属性文件:
sonar.jdbc.username=sonar sonar.jdbc.password=sonar sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance sonar.jdbc.driverClassName=com.mysql.jdbc.Driver
#Configure here general information about the environment, such as SonarQube DB details for example #No information about specific project should appear here #----- Default SonarQube server sonar.host.url=http://localhost:9000 #----- PostgreSQL sonar.jdbc.url=jdbc:postgresql://localhost/sonar #----- MySQL sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8 #----- Oracle #sonar.jdbc.url=jdbc:oracle:thin:@localhost/XE #----- Microsoft SQLServer #sonar.jdbc.url=jdbc:jtds:sqlserver://localhost/sonar;SelectMethod=Cursor #----- Global database settings sonar.jdbc.username=sonar sonar.jdbc.password=sonar #----- Default source code encoding #sonar.sourceEncoding=UTF-8 #----- Security (when ‘sonar.forceAuthentication‘ is set to ‘true‘) sonar.login=admin sonar.password=admin
sh sonar.sh start
标签:
原文地址:http://www.cnblogs.com/huey/p/4340850.html