Professional Documents
Culture Documents
Install Kong and Konga On CentOS7
Install Kong and Konga On CentOS7
Install Kong and Konga On CentOS7
Article
1. Install Kong
Install environment
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 1/16
9/7/2021 Install Kong and Konga on CentOS7
Install postgresql 10
# yum install -y
https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-
x86_64/pgdg-redhat-repo-latest.noarch.rpm
# /usr/pgsql-10/bin/postgresql-10-setup initdb
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 2/16
9/7/2021 Install Kong and Konga on CentOS7
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 3/16
9/7/2021 Install Kong and Konga on CentOS7
# passwd postgres
# adduser kong
# passwd kong
# su postgres
psql
\q
exit;
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 4/16
9/7/2021 Install Kong and Konga on CentOS7
Config Postgres
# vim /var/lib/pgsql/10/data/pg_hba.conf
add this
# vim /var/lib/pgsql/10/data/postgresql.conf
listen_addresses = 'localhost'
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 5/16
9/7/2021 Install Kong and Konga on CentOS7
Install Kong
Documentation for Kong, the Cloud Connectivity Company for APIs and
Microservices.
# cp /etc/kong/kong.conf.default /etc/kong/kong.conf
# vim /etc/kong/kong.conf
1 admin_listen =0.0.0.0:8001
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 6/16
9/7/2021 Install Kong and Konga on CentOS7
2
3 database = postgres
4 pg_host = 127.0.0.1
5 pg_port 5432
6 pg_user = kong
8 pg_database = kong
Start kong
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 7/16
9/7/2021 g g p Install Kong and Konga
g on CentOS7
g
# kong start -c/etc/kong/kong.conf --vv
# curl 127.0.0.1:8001
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 8/16
9/7/2021 Install Kong and Konga on CentOS7
2. Install Konga
# su kong
$ cd
install nvm
$ curl
https://raw.githubusercontent.com/creationix/nvm/master/install.sh |
bash
$ source ~/.bashrc
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 9/16
9/7/2021 Install Kong and Konga on CentOS7
$ cd konga
$ npm i
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 10/16
9/7/2021 Install Kong and Konga on CentOS7
$ su postgres
psql
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 11/16
9/7/2021 Install Kong and Konga on CentOS7
psql
\q
exit;
postgresql://konga:your_password@127.0.0.1:5432/konga
$ cp -r .env_example .env
$ vim .env
1 HOST=your_ip
2 PORT=1337
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 12/16
9/7/2021 Install Kong and Konga on CentOS7
2 PORT=1337
3 NODE_ENV=production
4 KONGA_HOOK_TIMEOUT=120000
5 DB_ADAPTER=postgres
6 #DB_URI=postgresql://localhost:5432/konga
7 DB_USER=konga
8 DB_PASSWORD=your_password
9 DB_PORT=5432
10 DB_DATABASE=konga
11 KONGA_LOG_LEVEL=warn
12 TOKEN_SECRET=some_secret_token
Start Konga
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 13/16
9/7/2021 Install Kong and Konga on CentOS7
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 14/16
9/7/2021 Install Kong and Konga on CentOS7
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 15/16
9/7/2021 Install Kong and Konga on CentOS7
Stop Konga
$ kill -9 30936
Share
https://blog.unixdev.co.th/install-kong-and-konga-on-centos7/ 16/16