用linux自带jdk出错 安装sun(oracle)jdk [[linux/rehl5安装jdk]]
== 下载安装软件 == {{{ wget http://dist.sonar.codehaus.org/sonar-3.7.2.zip unzip sonar-3.7.2.zip mv sonar-3.7.2 /etc/sonar /etc/sonar/bin/linux-x86-64/sonar.sh console //start sonar{console | start |stop |restart|status|dump} }}} 打开浏览器,输入 http://localhost:9000/ 可见软件界面安装完毕 (default System administrator credentials are admin/admin)。
'''默认使用h2数据库,如果使用:mysql postgresql''' http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+SonarQube+Runner
==== 更改数据库,改成自己要使用的数据库,及密码,其它数据库url注释 ==== {{{ vi conf/sonar.properties sonar.jdbc.username: sonarqube sonar.jdbc.password: mypassword sonar.jdbc.url: jdbc:postgresql://localhost/sonarqube }}} 更改后,/etc/sonar/bin/linux-x86-64/sonar.sh start
'''sonar-runner 的数据库连接conf/sonar-runner.properties也要做相应更改'''
== 使用方法 == 1. 下载 SonarQube runner {{{ wget http://repo1.maven.org/maven2/org/codehaus/sonar/runner/sonar-runner-dist/2.3/sonar-runner-dist-2.3.zip unzip sonar-runner-dist-2.3.zip -d /etc }}} 1. 下载示例项目 {{{ wget https://github.com/SonarSource/sonar-examples/archive/master.zip unzip sonar-examples-master.zip }}} 1. 进入项目目录执行sonar-runner {{{ cd sonar-examples-master/projects/languages/java/sonar-runner/java-sonar-runner-simple /etc/sonar-runner-2.3/bin/sonar-runner }}} 1. 刷新浏览器,可见"Projects"中出现"Simple Java project analyzed with the SonarQube Runner"
== 安装插件 == admin/admin登录后,点击"settings","Update Center",查看已安装的插件及,可以安装的插件。
== 本地化 == admin/admin登录后,点击"settings","Update Center","Available Plugins"向下接至"Localiztion",安装语言包 点击"General Settings","Localiztion",更改设置。
Comments !