시스템운영

SonarQube 설치 방법

호이잇! 2017. 8. 22. 14:41

--default-storage-engine=InnoDB


CREATE DATABASE sonar2 CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE USER 'sonar' IDENTIFIED BY 'thskqbzm1';

GRANT ALL ON sonar2.* TO 'sonar'@'%' IDENTIFIED BY 'sonar';

GRANT ALL ON sonar2.* TO 'sonar'@'localhost' IDENTIFIED BY 'sonar';

FLUSH PRIVILEGES;


권한 확인

show grants for 'sonar'@'%';



https://github.com/SonarQubeCommunity/sonar-l10n-ko/releases/download/1.2.0/sonar-l10n-ko-plugin-1.2.0.jar



sonarqube 프로퍼티 파일을 수정한다.


$cd /opt/sonarqube-5.1/conf

$vi sonar.properties


#이거 두개 주석을 푼다.

sonar.jdbc.username=sonar

sonar.jdbc.password=sonar


#이거 주석을 푼다.

sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance

#이거 두개 추가해 준다.

sonar.jdbc.driverClassName=com.mysql.jdbc.Driver

sonar.jdbc.validationQuery=select 1


 http://localhost:9000/sonar 로 접속할 수 있다.


sonar.web.host=127.0.0.1

sonar.web.context=/sonar

sonar.web.port=9000


실행

$cd /opt/sonarqube-5.1/bin

$cd linux-x86-64

$./sonar.sh start


Starting SonarQube...

Started SonarQube.