sonar安装

从http://www.sonarqube.org/downloads/下载安装文件mysql

本文安装在centos下。linux

一、解压sonarqube-5.1.zip,上传到服务器中。web

二、修改执行权限sql

# 进入运行目录
cd /usr/local/sonarqube-5.1/bin/linux-x86-64/

# 修改权限
chmod +x /usr/local/sonarqube-5.1/bin/linux-x86-64/sonar.sh
chmod +x /usr/local/sonarqube-5.1/bin/linux-x86-64/wrapper

三、加入到系统环境变量shell

vi /etc/profile

    export PATH=$PATH:/usr/local/sonarqube-5.1/bin/linux-x86-64/

# 使环境变量生效
source /etc/profile

四、配置sonar与数据库的链接(会自动建立表等)数据库

vi /usr/local/sonarqube-5.1/conf/sonar.properties

    # 编辑jdbc的用户名和
    sonar.jdbc.username=root
    sonar.jdbc.password=123456

    # 配置mysql
    #----- MySQL 5.x
    # Only InnoDB storage engine is supported (not myISAM).
    # Only the bundled driver is supported.
    sonar.jdbc.url=jdbc:mysql://192.168.1.56:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
    
    # 配置web
    sonar.web.host=192.168.1.19
    sonar.web.port=8080
    sonar.web.context=/sonar

五、启动服务centos

 sonar.sh start

六、访问服务器

    http://192.168.1.19:8080/sonarapp

相关文章
相关标签/搜索