歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> 學習Linux >> centos 6.5 安裝和配置 SonarQube

centos 6.5 安裝和配置 SonarQube

日期:2017/3/6 9:13:12   编辑:學習Linux

centos 6.5 安裝和配置 SonarQube


centos 6.5 安裝和配置 SonarQube


1、下載安裝包:
http://www.sonarqube.org/downloads/

2、上傳服務器並解壓:

unzip sonarqube-5.6.zip -d /dir

3、安裝MySQL並進入mysql

3.1 mysql -u root -p3.2  創建數據庫和賬號:
mysql> CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci; mysql> CREATE USER 'sonar' IDENTIFIED BY 'sonar';mysql> GRANT ALL ON sonar.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';mysql> GRANT ALL ON sonar.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar';mysql> FLUSH PRIVILEGES;

4配置 sonar參數 ,連接mysql vi /conf/sonar.properties文件

去掉注釋並增加:

 sonar.jdbc.url=jdbc:mysql://192.168.16.219:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformancesonar.jdbc.username=rootsonar.jdbc.password=rootsonar.sorceEncoding=UTF-8sonar.login=adminsonar.password=admin

5、啟動服務 目錄切換至sonar的

/bin/linux-x86-64/目錄,啟動服務

#./sonar.sh start   啟動服務#./sonar.sh stop    停止服務#./sonar.sh restart 重啟服務

訪問http:\ip:9000即可

tips: 有的時候留意: iptables 是否阻止, 可以先service iptables stop 確認 是否影響

http://xxxxxx/Linuxjc/1156053.html TechArticle

Copyright © Linux教程網 All Rights Reserved