美文网首页
安装SonarQuber6.5

安装SonarQuber6.5

作者: 一课一练 | 来源:发表于2017-10-10 17:31 被阅读0次
  1. 下载SonarQuber zip包并解压至目录
wget https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-6.5.zip
unzip sonarqube-6.5.zip
  1. 在MySql中创建Schema
mysql> CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci; 
Query OK, 1 row affected (0.00 sec)
mysql> CREATE USER 'sonar' IDENTIFIED BY 'sonar';
Query OK, 0 rows affected (0.00 sec)
mysql>  GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar';
Query OK, 0 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit;

设置max_allowed_packet的值,以防无法上传Report

vim /etc/my.cnf
// 在[mysqld]一节下加入
max_allowed_packet=64M
  1. 设置properties
    编辑<SONAR_HOME>/conf/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&useSSL=false
  1. 防火墙开端口
firewall-cmd --permanent --zone=public --add-port=9000/tcp
firewall-cmd --reload

相关文章

网友评论

      本文标题:安装SonarQuber6.5

      本文链接:https://www.haomeiwen.com/subject/zkhbyxtx.html