zoukankan      html  css  js  c++  java
  • 2019-05-14 Sonar部署

    1.下载软件地址:https://www.sonarqube.org/#downloads

      官方文档:https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Ant

    2.LTS Release不是最新但是是稳定的版本长久支持;Latest Realease是最新版本不稳定;

    3.Sonar的依赖库:community/documentation/requirements

    4.安装(zip安装包)

    Windows下直接解压安装:

    Linux下:

      yum install unzip  ------y----完成

      unzip sonarquebe-6.7.4.zip

      mv sonarquebe-6.7.4 /usr/local/

      cd /usr/local/

    5.mySql操作

      mysql -u root -p 

    >CREATE DATABASE sonar DEFAULT CHARACTER SET utf8;

    >use sonar

    >exit

      cd sonarquebe-6.7.4/

      (bin下放入的是启动脚本;conf下是配置文件)

      cd conf/

      ll

    6.vim sonar.properties

      1.更改数据库账号,url:

      查找内容:/soanr.jdbc.username

    放开注释:

      soanr.jdbc.username=root

      sonar.jdbc.password=xbclass

      soanr.jdbc.url=??

    2.查找:/web.context

    放开注释(浏览器以下面的后缀访问):

      sonar.web.context=/soanr

    放开端口默认是9000:

      sonar.web.host=0.0.0.0

      :wq

    7.创建用户:

      useradd sonar

    8.切换用户所有权:

      chown -R sonar:sonar sonarquebe-6.7.4/

      ll

    9.切换到相应用户去启动sonar:

      su sonar

      cd sonarquebe-6.7.4/bin/

      ll

      cd linux-x86-64/

      ll

      ./sonar.sh start

    10.查看是否有启动:

      ps aux | grep sonar

    11..在其他电脑的浏览器端查看sonar是否可用:

      如果没有反应:

      查看Linux服务器防火墙:

        su root

        vim /etc/sysconfig/ipttables

        -A那些行都是开发的端口咱们需要手动添加一行9000端口

        :wq

      重启防火墙:

        service iptables restart

      刷新浏览器

      登陆:admin/admin

    12.生成itoken

        复制出itoken码-----java---maven/ant---copy---finished

    13.常用命令:

        目录查询

        pwd 

  • 相关阅读:
    EntityFramework优缺点
    领导者与管理者的区别
    七个对我最好的职业建议(精简版)
    The best career advice I’ve received
    Difference between Stored Procedure and Function in SQL Server
    2015年上半年一次通过 信息系统项目管理师
    Difference between WCF and Web API and WCF REST and Web Service
    What’s the difference between data mining and data warehousing?
    What is the difference between a Clustered and Non Clustered Index?
    用new创建函数的过程发生了什么
  • 原文地址:https://www.cnblogs.com/baiyy/p/10860806.html
Copyright © 2011-2022 走看看