1.SonarQube安装
1.1.需要已安装mysql,sonarQube的服务器启动需要非root用户,注意文件权限,指定系统环境为jdk1.8(不会百度)
(1)sonarQube 下载地址https://www.sonarqube.org/downloads/ 我下载的是sonarqube-6.7.6
(2)解压文件后到 bin目录下 执行
./bin/linux-x86-64/sonar.sh start
然后查看日志
tail -200f ./logs/sonar.log
访问http://你的IP:9000/sonar 看到欢迎界面即成功
1.2数据库配置
sonarQube配置mysql,修改/conf/sonar.properties
sonar.jdbc.username=test
sonar.jdbc.password=1234
sonar.jdbc.url=jdbc:mysql://数据库IP:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
sonar.web.host=你的本地