2.2. DB 설정
2.1.3. PostgreSQL 설치에서 구성한 PostgreSQL 서버에 API 게이트웨이 데이터베이스를 설정합니다.
/home/centos/apigw-src
디렉토리에 API 게이트웨이 소스코드를 다운로드하는 것으로 설명합니다.
- API 게이트웨이 Git 저장소를 복제합니다.
$ cd ~
$ git clone https://github.com/IoTKETI/citydatahub_apigw_module.git apigw-src
apigw-src/db/
디렉토리의apigw_init.sql
파일과dml_
로 시작하는 파일이 존재하는지 확인합니다.해당 파일을 2.1.3. PostgreSQL 설치에서 구성한 PostgreSQL 서버에서 다음 명령어를 실행합니다.
$ cd ~/apigw-src/db
# API 게이트웨이 테이블 생성
$ psql -U postgres < apigw_init.sql
# API 라우팅 룰 적용 (dml_로 시작하는 파일)
$ psql -U postgres < dml_security.sql
$ psql -U postgres < dml_data_ingest.sql
$ psql -U postgres < dml_marketplace.sql