Buscar este blog

domingo, 12 de febrero de 2017

Centos 6 - Configure SonarQube with PostgreSQL

Just for my reminder.
How to configure SonarQube 5.X with PostgreSQL 8.X in Centos 6.6

Install postgresql.
yum install postgresql-server

service postgresql initdb

chkconfig postgresql on
service postgresql start

Configure access.
Edit /var/lib/pgsql/data/pg_hba.conf file and set the following config:
local all all trust
host all 127.0.0.1/32 trust

Create sonar user and database (you have to restart the service before).
psql -U postgres
postgres=# create user sonar with password 'sonar';
postgres=# create database sonar with owner sonar encoding 'UTF8';

Configure sonar.
Edit /usr/local/sonarqube/conf/sonar.properties file:
(...)

# User credentials.
# Permissions to create tables, indices and triggers must be granted to JDBC user.
# The schema must be created first.
sonar.jdbc.username=sonar
sonar.jdbc.password=sonar

#----- Embedded Database (default)
# H2 embedded database server listening port, defaults to 9092
#sonar.embeddedDatabase.port=9092

(...)

#----- PostgreSQL 8.x/9.x
# If you don't use the schema named "public", please refer to http://jira.sonarsource.com/browse/SONAR-5000
sonar.jdbc.url=jdbc:postgresql://localhost/sonar

(...)

Done.

No hay comentarios:

Publicar un comentario