이 문서는 Windows 환경에서 SonarQube 설치 가이드 문서를 제공한다.


설치 환경


설치 화면

Download

SonarQube의 web size 접속 하여 SonarQube를 Download 한다.


경로 지정

Download를 통하여 다운 받은 SonarQube를 압축해제 하여 원하는 경로에 복사해 둔다.


Database 생성

SonarQube와 연동 해야 할 DB를 구성 해 준다.

psql
create role sonar with login password 'sonar';
create database sonar owner=sonar;
grant all privileges on DATABASE sonar to sonar;



Sonar 실행용 JAVA HOME 지정

// setx SONAR_JAVA_PATH "java.exe 경로"
setx SONAR_JAVA_PATH "C:\Program Files\java_home\bin\java.exe"



Sonar.properties 변경

경로 지정 한 sonarqube-6.4\conf\sonar.properties 파일을 변경 한다.



Windows Service 등록

경로 지정 한 sonarqube-6.4\bin\windows-x86-64 이동 한다.(운영체제가 32bit 경우 windows-x86-32 으로 이동한다.)

  1. InstallNTService.bat 을 실행 해준다.(서비스를 등록 시키기 위함, 등록이 안 된다면 관리자 모드로 실행 하면 된다.)
  2. StartNTService.bat 을 실행 해준다.


Website 접속

http://localhost:9000 or http://ipaddress:9000 으로 접속 한다.

ID / PW : admin / admin