SonarQube with JDK 17 & Postgres as DB backend
DB:
Install Postgres Server 16.x
Execute the below SQL Script from Postgres DB:
CREATE USER sonar ;
ALTER USER sonar WITH PASSWORD 'sonar';
CREATE DATABASE sonardb WITH ENCODING 'UTF8';
ALTER DATABASE sonardb OWNER TO sonar;
SonarQube:
Add SONAR_JAVA_PATH in Environment variable with value like below <Java_Path>\Java\jdk17.0.8_8\bin\javaw.exe
In sonar.properties
1. Update JDBC url
sonar.jdbc.url=jdbc:postgresql://localhost:5432/sonardb?currentSchema=public
2. Update the below 2 properties too
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
Once done with above steps;
Navigate to <Sonar Path>\sonarqube-10.2.1.78527\bin\windows-x86-64
From Command prompt type StartSonar.bat to start
Sonar should be accessible:
http://localhost:9000/