sonar 是一个很好的质量度量平台,安装方式有很多种。下面我教大家使用j2ee 容器的方式安装,我们使用tomcat

1.准备:

1.1 环境redhat linux
1.2 下载sonar 从http://www.sonarsource.org/
1.3  安装mysql,一般系统自带的就可以,直接使用service mysql start 即可启动
1.4  需要jdk1.6 的版本
1.5 下载tomcat,从tomcat.apache.org,版本6.0 系列

2. 安装

2.1首先建一个目录:mkdir /soft

2.2 cp sonar$version.zip /soft

2.3 cp tomcat$version.zip /soft

2.4 解压sonar 和tomcat 使用unzip 命令

2.5 cd /soft/sonar$vesion

2.6 修改 conf/sonar.properties 如下

  1. # The schema must be created first.
  2. sonar.jdbc.username:                       sonar
  3. sonar.jdbc.password:                       sonar
  4. #----- MySQL 5.x/6.x
  5. # Comment the embedded database and uncomment the following line to
  6. use MySQL
  7. sonar.jdbc.url:                            jdbc:mysql://localhost:3306/sonar?user=sonar&password=sonar&useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true
  8. # Optional properties
  9. sonar.jdbc.driverClassName:                com.mysql.jdbc.Driver
  10. sonar.jdbc.validationQuery:                select 1

2.7 在mysql 里创建数据库sonar,及其使用sonar,sonar 用户名和密码访问授权操作,命令如下:

  1. mysql
  2. mysql>create database sonar;
  3. mysql>grant all on *.* to sonar@'localhost' identified by 'sonar';
  4. mysql>grant all on *.* to sonar@'%' identified by 'sonar';
  5. mysql>flush privileges;

2.8 build sonar 的war 包,修改文件 /soft/sonar$version/war/sonar-server/WEB-INF/classes/sonar-war.properties
SONAR_HOME=/soft/sonar$version (即sonar 的解压目录)
cd /soft/sonar$version/war
sh ./build-war.sh

2.9 复制 sonar.war 到tomcat/webapps/

2.10 修改tomcat 参数,修改$tomcat_home/bin/catalina.sh, 添加如下
CATALINA_OPTS="-Xmx1024m -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -XX:MaxPermSize=256m"

2.11 启动tomcat,cd $tomcat_home/bin; sh ./startup.sh

3. 访问sonar:htt://localhost:8080/sonar ,使用admin,admin 即可登录

更多资料关注:www.kootest.com ;技术交流群:182526995

sonar之安装篇的更多相关文章

  1. k8s入门系列之扩展组件(一)DNS安装篇

    DNS (domain name system),提供域名解析服务,解决了难于记忆的IP地址问题,以更人性可读可记忆可标识的方式映射对应IP地址. Cluster DNS扩展插件用于支持k8s集群系统 ...

  2. Linux负载均衡软件LVS之二(安装篇)[转]

    Linux负载均衡软件LVS之二(安装篇) 2011-04-26 16:01:47 标签:lvs安装配置 linux lvs 休闲 linux高可用 原创作品,允许转载,转载时请务必以超链接形式标明文 ...

  3. 开源文档管理系统LogicalDOC测试报告---安装篇

    开源文档管理系统LogicalDOC测试报告---安装篇 分类: Linux2011-06-22 15:40 7436人阅读 评论(3) 收藏 举报 文档管理测试mysql数据库installerja ...

  4. MongoDB安装篇-Win7 X64

    介绍 MongoDB是一个基于分布式文件存储的数据库.由C++语言编写.旨在为WEB应用提供可扩展的高性能数据存储解决方案. MongoDB是一个介于关系数据库和非关系数据库之间的产品,是非关系数据库 ...

  5. Flow简易教程——安装篇

    .mydoc_h1{ margin: 0 0 1em; } .mydoc_h1_a{ color: #2c3e50; text-decoration: none; font-size: 2em; } ...

  6. Ubuntu 16.04 RabbitMq 安装与运行(安装篇)

    Ubuntu 16.04 RabbitMq 安装与运行(安装篇) 2018年08月15日 15:05:24 我跟吴彦祖四六开 阅读数:1966   前言 目前公司用阿里云 + redis 的方式实现的 ...

  7. git在工作中的用法总结-环境安装篇

    使用git有很长一段时间了 ,平时用到的时候都是直接google,经常用到的一些也记录在笔记中,但有时候笔记太多,实在是太乱了(其实是我太懒~ 哈?),找都要半天的时候还不如直接google,今天有空 ...

  8. rabbitmq学习(一) —— 安装篇

    安装篇之windows: 略(楼主在windows上安装基本就是按部就班的没遇到什么坑) 安装篇值centos7: 主要记录下centos7下的安装,因为在该系统下安装稍微折腾了下 参考https:/ ...

  9. OracleDesigner学习笔记1――安装篇

    OracleDesigner学习笔记1――安装篇   QQ:King MSN:qiutianwh@msn.com Email:qqking@gmail.com 一.       前言 Oracle是当 ...

随机推荐

  1. Duilib介绍以及各个类的简介

    转自http://note.sdo.com/u/icez/n/mvO-X~jyVnpFnM01A0000m DirectUI意为直接在父窗口上绘图(Paint on parent dc directl ...

  2. csu 1306 Manor(优先队列)

    http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1306 1306: Manor Time Limit: 1 Sec  Memory Limit: 1 ...

  3. git初探

    1 Linux下Git和GitHub环境的搭建 第一步: 安装Git,使用命令 "sudo apt-get install git" 第二步: 到GitHub上创建GitHub帐号 ...

  4. 1046: [HAOI2007]上升序列 - BZOJ

    Description 对于一个给定的S={a1,a2,a3,…,an},若有P={ax1,ax2,ax3,…,axm},满足(x1 < x2 < … < xm)且( ax1 < ...

  5. uva 624

    背包问题  总时间为容量,单个唱片时间为各个物体的价值与体积   f[] 用来记录路径 #include <cstdio> #include <cstring> #define ...

  6. Firefly Http通信简单介绍

    原地址:http://www.9miao.com/question-15-54042.html 首先创建firefly工程,firefly-admin.py createproject httptes ...

  7. IIC驱动分析

    IIC设备是一种通过IIC总线连接的设备,由于其简单性,被广泛引用于电子系统中.在现代电子系统中,有很多的IIC设备需要进行相互之间通信 IIC总线是由PHILIPS公司开发的两线式串行总线,用于连接 ...

  8. 大象的崛起!Hadoop七年发展风雨录

    http://www.open-open.com/news/view/a22597 在互联网这个领域一直有这样的说法:“如果老二无法战胜老大,那么就把老大赖以生存的东西开源吧”.当年Yahoo!与Go ...

  9. orm框架与缓存的关系

    1.mybatis规定,一级缓存没必要bean类实现序列化,但二级缓存bean类必须实现序列化. 因为二级缓存是基于namespace的也就是基于接口的,二级缓存可以设置存储源,可以是redis或者m ...

  10. POJ2531——Network Saboteur(随机化算法水一发)

    Network Saboteur DescriptionA university network is composed of N computers. System administrators g ...