zoukankan      html  css  js  c++  java
  • sonarqube  安装配置

    http:// www.sonarqube.org

    MySQL

    Unsupported mysql version: 5.5. Minimal supported version is 5.6.

    There are two well-known engines that can be used in MySQL: MyISAM and InnoDB. MyISAM is the oldest of the two engines and is being progressively replaced by InnoDB. InnoDB is clearly faster and scales better with SonarQube as the number of projects under quality control increases. If you were an early adopter of SonarQube, you probably have a series of table that are still using MyISAM. To improve performances, you should change the engine for all tables to InnoDB.

    Once all SonarQube tables are using the InnoDB engine, the first thing to do is allocate a maximum amount of RAM to your MySQL instance with the innodb_buffer_pool_size parameter and give at least 15Mb to the query_cache_size parameter. Read this article about InnoDB Performance Optimization Basics for more information.

    1.数据库配置
    进入数据库命令
    #mysql -u root -p

    mysql> CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci; 
    mysql> CREATE USER 'sonar' IDENTIFIED BY 'sonar';
    mysql> GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';
    mysql> GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar';
    mysql> FLUSH PRIVILEGES;


    mysql> show variables like '%storage_engine%';

    vi /etc/my.cnf
    [mysqld] # 增加
    default-storage-engine=INNODB

    innodb_buffer_pool_size = 256M #设大,专门的服务器为 70-80%

    query_cache_type=1
    query_cache_size=32M

    安装

     wget https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.zip

    解压

    进入sonarqube目录

    vi sonar.properties 

    修改

    sonar.jdbc.username=sonar
    sonar.jdbc.password=sonar

    #----- Embedded Database (default)
    # H2 embedded database server listening port, defaults to 9092
    #sonar.embeddedDatabase.port=9092
    #----- MySQL 5.6 or greater
    # Only InnoDB storage engine is supported (not myISAM).
    # Only the bundled driver is supported. It can not be changed.
    sonar.jdbc.url=jdbc:mysql://172.18.22.122:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance

    sonar.web.context=/sonar

    启动:

    /home/openim/sonarqube-5.6/bin/linux-x86-64/sonar.sh start

     访问:

    http://172.18.22.122:9000/sonar

    使用

    初始密码: admin/admin

    汉化:插件中心,找到语言,下载并安装

    checkstyle PMD cobertura(测量测试覆盖率)的常用插件也安装

    重启生效

    manen配置:

    <profile>

    <id>sonar</id>

    <activation>

    <activeByDefault>true</activeByDefault>

    </activation>

    <properties>

    <sonar.jdbc.url>

    jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8

    </sonar.jdbc.url>

    <sonar.jdbc.driver>com.mysql.jdbc.Driver</sonar.jdbc.driver>

    <sonar.jdbc.username>sonar</sonar.jdbc.username>

    <sonar.jdbc.password>sonar</sonar.jdbc.password>

    <sonar.host.url>http://localhost:9000</sonar.host.url>

    </properties>

    </profile>

  • 相关阅读:
    webpack / vue项目 config/index.js配置(用于配置webpack服务器代理)
    vue实现两重列表集合,点击显示,点击隐藏的折叠效果,(默认显示集合最新一条数据,点击展开,显示集合所有数据)
    Vue 组件之间传值
    js实现把textarea通过换行或者回车把多行数字分割成数组,并且去掉数组中空的值。
    sublime text3 插件安装方法
    webpack配置sass模块的加载
    display:table和display:table-cell的妙用
    根据输入地址获得经纬度
    pytest 学习笔记二:兼容unittest、执行方式、生成报告
    pytest 学习笔记一:参数化与组织分层
  • 原文地址:https://www.cnblogs.com/hujihon/p/5677607.html
Copyright © 2011-2022 走看看