...
코드 블럭 |
---|
CREATE SCHEMA sonarschema; // 스키마 생성 ALTER USER sonaruser SET search_path to sonarschema; |
connection method 변경
코드 블럭 |
---|
[root@playground data]# vi /var/lib/pgsql/9.3/data/pg_hba.conf
// METHOD를 md5로 변경
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 ident |
사용자 접속 확인
코드 블럭 |
---|
[root@playground opt]# psql -U sonaruser -d sonar
Password for user sonaruser:
sonar=> |
PostgreSQL 서비스 재시작
코드 블럭 |
---|
systemctl restart sonarqube |
sonar.properties 복사 및 변경
현재 사용중인 properties 복사이름 변경 및 복사
코드 블럭 |
---|
cpmv <install dir>/conf/sonar.properties sonar-MySQL.properties cp sonar-postMySQL.properties soanr.properties |
복사한 properties를 PostgreSQL 구성에 맞게 변경
코드 블럭 |
---|
vi sonar-post.properties // 아래 MySQL 내용을 주석처리 #sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false // 아래 PostgreSQL 내용을 주석 해제 sonar.jdbc.url=jdbc:postgresql://localhost:5432/sonar |
...
SonarQube 서비스 종료
코드 블럭 |
---|
systemctl stop sonarqube |
SonarQube 서비스 시작 ( Migration 전 PostgreSQL에 SonarQube 테이블 생성 필요 )
코드 블럭 |
---|
systemctl start sonarqube |
DB Migration
Migrator 압축 해제
...