首页 > 代码库 > SonarQube的安装
SonarQube的安装
1、jdk1.8 mysql5.6(以上)2、下载sonarqube http://www.sonarqube.org/downloads/ 2.1、解压,修改配置文件sonarqube-*\conf\sonar.properties sonar.login=admin sonar.password=admin sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance sonar.jdbc.username=root sonar.jdbc.password=123456 sonar.sorceEncoding=UTF-82.2、启动 a、进入sonarqube-*/bin/ b、./sonar.sh start 2.3、登陆 http://localhost:9000 administrator --> System --> Update center --> avaliable --> 汉化包 3、下载sonar runner安装包 https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/3.1、解压,修改配置文件sonar-scanner-*\conf\sonar-runner.properties sonar.host.url=http://localhost:9000 sonar.jdbc.url=jdbc:mysql://172.16.30.228:3306/qjfsonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance sonar.jdbc.username=gmsd sonar.jdbc.password=gmsdtrade4、分析,环境变量(略) sonar-runner -version4.1打开要进行代码分析的项目根目录,新建sonar-project.properties文件 # must be unique in a given SonarQube instance sonar.projectKey=my:apiautocore # this is the name displayed in the SonarQube UI sonar.projectName=apiautocore(项目名字) sonar.projectVersion=1.0 # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. # Since SonarQube 4.2, this property is optional if sonar.modules is set. # If not set, SonarQube starts looking for source code from the directory containing # the sonar-project.properties file. #sources是源文件所在的目录 sonar.sources=src sonar.binaries=WebRoot/WEB-INF/classes # Encoding of the source code. Default is default system encoding sonar.language=java sonar.my.property=value #sonar.sourceEncoding=UTF-84.2、启动sonarqube服务,在cmd进入项目所在的根目录,输入命令:sonar-runner 5、看结果 打开http://localhost:9000/
SonarQube的安装
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。