• sonar之安装篇


    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

  • 相关阅读:
    《TCP/IP网络协议基础》笔记
    《MySQL基础知识》笔记
    tc。数组的定义。
    tc。单等号,双等号的作用。
    tc。用浏览器加载gif图片。
    tc。做无界面的程序。
    做馒头一斤面放多少水。
    用笼屉蒸馒头好吃,还是用蒸柜蒸馒头好吃。上汽的大小。
    千层馒头的制作。
    馒头店,普遍是开在菜市场附近。
  • 原文地址:https://www.cnblogs.com/kootest/p/4088088.html
Copyright © 2020-2023  润新知