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=你的本地IP
sonar.web.context=/sonar
sonar.web.port=9000

重启服务 观察日志

1.3sonarQube汉化

(1)按照如下步骤安装中文插件  \"\"

     \"\"

    (2)重启,重新访问即可发现汉化成功。

1.4简单实用

默认用户名是admin 密码admin

收藏 打印