본문 바로가기
보안 및 개발/ETC...

SonarQube in Windows

by CH@3M 2021. 12. 12.

1. Java 11 버전 환경 세팅

2. 소나큐브 다운로드 : https://www.sonarqube.org/downloads/

내가 선택한 버전은 : 8.9 LTS

요구 환경 : https://docs.sonarqube.org/8.9/requirements/requirements/

3. sonar.properties 설정 활성화 및 수정 (이부분을 안해줘서 그런지 계속 에러 발생 했었음)

sonar.web.host=127.0.0.1
sonar.web.port=9000
sonar.path.data=data
sonar.path.temp=temp

설정파일 수정 안해줬을때 발생했던 에러

 

4. 서비스 등록

sc.exe create SonarQube binPath="C:\sonarqube-8.9.3.48735\sonarqube-8.9.3.48735\bin\windows-x86-64\wrapper.exe -s C:\sonarqube-8.9.3.48735\sonarqube-8.9.3.48735\conf\wrapper.conf

5. 관리자 권한으로 파일 실행

C:\sonarqube-8.9.3.48735\sonarqube-8.9.3.48735\bin\windows-x86-6\

StartNTService.bat -> StartSonar.bat

6. 설정한 IP 및 Port인 127.0.0.1:9000 접속

7. admin/admin 로그인


1. 프로젝트 생성

프로젝트 생성 시 토큰과 실행해야될 명령어는 별도로 메모해 두기

other 언어 진단 시, Sonar Scanner 설치하여 사용해야함

 

2. Sonar Scanner 설치 

설치 후 프로젝트 생성 시 알려준 실행해야될 명령어를 입력하여 Sonar Scanner 실행

 

3. 스캐너 실행이 완료되면 SonarQube에서 결과 리포트 확인 가능

반응형