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>
sonarqube 安装配置的更多相关文章
- 从零开始针对 .NET 应用的 DevOps 运营实践 - Jenkins & SonarQube 安装配置
一.Overview 继续 DevOps 实施的相关内容,在上一篇的博客中,完成了对于工具链中使用到的软件所需的运行环境的配置,在这一篇的博客中,将聚焦于我们使用到的两个主要的软件:Jenkins 与 ...
- SonarQube(5.0.1) 环境的安装配置
SonarQube 安装步骤 确定 JDK 和 MySQL 已经成功安装. 下载 SonarQube 及工具 SonarQube Runner,下载地址:http://www.sonarqube.or ...
- CentOS7安装配置SonarQube
一.SonarQubeServer 1.前提 安装好mysql5.7和jdk1.8. (1)安装Mysql create user 'sonar'@'localhost' identified by ...
- .net持续集成sonarqube篇之sonarqube安装与基本配置
系列目录 Sonarqube下载与安装 Sonarqube下载地址是:https://www.sonarqube.org/downloads/下载版本有两个,一个是长期支持版,另一个是最新版,此处安装 ...
- SonarQube安装文档
1.SonarQube 1.1 SonarQube介绍 SonarQube是管理代码质量一个开放平台,可以快速的定位代码中潜在的或者明显的错误. SonarQube是否可以使用自定义规则由开发人员的开 ...
- 【Jenkins学习】安装配置和使用(一)
为了能够频繁地将软件的最新版本,及时.持续地交付给测试团队及质量控制团队,以供评审,所以引入持续集成工具Jenkins,从而实现公司新产品持续集成,自动化部署. 环境准备 ●操作系统:Windows1 ...
- 代码审查工具Sonarqube安装
前言:在项目开发当中,完成需求并上线是一件很开心的事情,但为了能按时上线功能不得不为了完成功能而写代码,写的时候觉得先把功能上了以后再回头优化此处代码,但真正上线之后你就会发现你再也不想去修改之前遗留 ...
- sonarQube安装及本机扫描C#项目
因项目需要,需要使用sonarQube对代码进行扫描并查看,因对sonarQube不熟悉,所以先在本机搭建测试环境. 参考了张老师的博客:http://www.cnblogs.com/danzhang ...
- Jenkins学习安装配置和使用
为了能够频繁地将软件的最新版本,及时.持续地交付给测试团队及质量控制团队,以供评审,所以引入持续集成工具Jenkins,从而实现公司新产品持续集成,自动化部署. 环境准备 ●操作系统:Windows1 ...
随机推荐
- jsp回车键登录代码
$("body").keydown(function(event) { if (event.keyCode == "13") {// keyCode=13是回车 ...
- [Android Pro] Android fastboot刷机和获取Root权限
参考文章: https://developers.google.com/android/nexus/images 转载自: http://www.inexus.co/article-1280-1 ...
- python——生成器
python——生成器 通过列表生成式,我们可以直接创建一个列表.但是,受到内存限制,列表容量肯定是有限的.而且,创建一个包含100万个元素的列表,不仅占用很大的存储空间,如果我们仅仅需要访问前面几个 ...
- Linux 中文乱码问题
弄了好久还是乱码 最终方法:进入 vim /etc/vimrc中 原先只有一个 set encoding=utf-8 fileencodings=ucs-bom,utf-8,cp936改成: let ...
- 【Ubuntu14.04.1】设置开机可以Root用户身份登录
$ sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf [SeatDefaults]user-session=ubuntugreet ...
- Android之Fragment(一)
Fragment的产生与介绍 Android运行在各种各样的设备中,有小屏幕的手机,超大屏的平板甚至电视.针对屏幕尺寸的差距,很多情况下,都是先针对手机开发一套App,然后拷贝一份,修改布局以适应平板 ...
- [杂] ASP.NET MVC 之 Route To MvcHandler
首先,本文参考了不少东东,仅供Q_L_H自己使用,ZZ自己负责.先上一张全家福: HttpModules and HttpHandlers ASP.NET MVC 是 HttpHandler. Url ...
- Windows Phone8 遇见的问题
1.公司的无线路由可以自动分发ip地址,模拟器可以自动获取ip,进行连接.宿舍的无线路设置了DHCP 不能自动分发ip地址,模拟器连接不到ip,上不去网,我就去hyper-v 管理器里修改了静态mac ...
- phpcms如何使用推荐位调用自定义字段
默认phpcms是无法使用推荐位调用自定义字段的 一般自定义字段默认添加在附表里(也可以添加在主表里),调用自定义字段时 加上moreinfo="1" 直接写{pc:content ...
- 用DTD约束XML详解及示例
文档类型定义(DTD)可定义合法的XML文档构建模块.它使用一系列合法的元素来定义文档的结构. dtd的三种引入方式 (1)引入外部的dtd文件 <!DOCTYPE 根元素名称 SYSTE ...