Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

1. Kong 설치

kong 최신버전을 설치하기 위한 방법은 다음과 같습니다.

참조 https://docs.konghq.com/install/centos/

 $ sudo yum update -y
 $ sudo yum install -y wget
 $ wget https://bintray.com/kong/kong-rpm/rpm -O bintray-kong-kong-rpm.repo
 $ export major_version=`grep -oE '[0-9]+\.[0-9]+' /etc/redhat-release | cut -d "." -f1`
 $ sed -i -e 's/baseurl.*/&\/centos\/'$major_version''/ bintray-kong-kong-rpm.repo
 $ sudo mv bintray-kong-kong-rpm.repo /etc/yum.repos.d/
 $ sudo yum update -y
 $ sudo yum install -y kong

2. 데이터베이스(PostgreSQL) 설치

# yum install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
# yum install postgresql11
# yum install postgresql11-server
# /usr/pgsql-11/bin/postgresql-11-setup initdb
# systemctl enable postgresql-11
# systemctl start postgresql-11

3. 데이터베이스 생성

유저와 데이터베이스를 생성합니다.

 # su postgres
bash-4.2$ psql
postgres=# \password postgres
새 암호를 입력하세요 : *****
다시 입력해주세요 : *****
postgres=# CREATE USER kong; CREATE DATABASE kong OWNER kong;
postgres=# \password kong
새 암호를 입력하세요 : *****
다시 입력해주세요 : *****
postgres=# quit
bash-4.2$ exit
exit 

그 후 kong.conf 파일로 마이그레이션을 진행합니다.

# cd /etc/kong
# mv kong.conf.default kong.conf
# vim kong.conf
====kong.conf====
database = postgres
pg_host = 127.0.0.1
pg_port = 5432
pg_timeout = 5000
pg_user = kong
pg_password = <password>
pg_database = kong
=================

# kong migrations bootstrap ./kong.conf

4. Kong 시작

앞서 설정한 kong.conf 파일을 통해 Kong을 시작합니다.

# kong start ./kong.conf

5. 실행 확인

# curl -i http://localhost:8001/
  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.