구축 방법
Java 설치
# Java 설치 관련 필요패키지 설치
$ sudo yum -y update
$ sudo yum -y install wget unzip
# Java 11 설치
$ sudo amazon-linux-extras install -y java-openjdk11
$ sudo yum install -y java-11-openjdk-devel
메모리 설정
$ sysctl vm.max_map_count
$ sysctl fs.file-max
$ ulimit -n
$ ulimit -u
DB 설치
$ amazon-linux-extras install postgresql10 vim epel -y
$ yum install -y postgresql-server postgresql-devel
$ /usr/bin/postgresql-setup --initdb
$ systemctl enable postgresql
$ systemctl start postgresql
DB 사용자 생성
$ su - postgres
$ psql
create user sonar with password 'sonar';
create database sonar owner sonar;
\q
exit
DB 설정
$ sudo vi /var/lib/pgsql/data/pg_hba.conf
$ sudo systemctl restart postgresql
- pg_hba.conf

SonarQube 설치
# Sonarqube를 opt 폴더 하위에 설치
$ cd /opt
$ sudo wget https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.6.zip
# 압축 해제 및 폴더명 변경
$ sudo unzip sonarqube-7.6.zip
$ sudo mv sonarqube-7.6 sonarqube
SonarQube DB 연동
$ sudo vi /opt/sonarqube/conf/sonar.properties
- sonar.properties

user 생성
$ sudo useradd sonar
$ sudo chown -R sonar:sonar /opt/sonarqube
실행/접속
$ sudo su - sonar
$ cd /opt/sonarqube/bin/linux-x86-64
$ ./sonar.sh start
- SonarQube 접속 화면

로그 경로
$ ll /opt/sonarqube/logs
es.log
sonar.log
web.log
access.log