- 下载SonarQube版本(下载最新版本SonarQube-6.4)
https://www.sonarqube.org/downloads/ - 安装数据库,使用外部DB(mysql-5.6.30)
https://dev.mysql.com/doc/refman/5.6/en/binary-installation.html
注意:用6.4版本的Sonar不建议用mysql-5.5,会存在服务启动后自己停止问题 - 解压SonarQube-6.4版本
unzip sonarqube-6.4.zip 修改配置文件
vim sonar.properties
修改一下内容信息,根据实际情况
sonar.jdbc.username=sonar //数据库用户名
sonar.jdbc.password=sonar //数据库密码sonar.jdbc.url=jdbc:mysql://192.168.1.1:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
sonar.web.host=192.168.1.1 //SonarQube访问IP和端口
sonar.web.port=9000列表内容
. 启动Sonar服务(根据系统要求选择,本机是linux的64位系统)
./sonar.sh start
6. 访问SonarQube(登录账号是admin/admin)