Reference documentation

  • Kong gateway, KongA, PostgresQL setup and use
  • Open source API Gateway System (Kong Tutorial) Beginner to master
  • Instructions for Konga

KONG service installation process

# Update the yum library
1. yum update -y
Install the wget package
2. yum install -y wget
# Download the Kong installation source
3. wget https://bintray.com/kong/kong-rpm/rpm -O bintray-kong-kong-rpm.repo

4. export major_version=`grep -oE '[0-9] + \. [0-9] +' /etc/redhat-release | cut -d "." -f1`

5. sed -i -e 's/baseurl.*/&\/centos\/'$major_version' '/ bintray-kong-kong-rpm.repo

6. sudo mv bintray-kong-kong-rpm.repo /etc/yum.repos.d/
# Update the yum library
7. sudo yum update -y
# yum install kong package
8. sudo yum install -y kong
Copy the code

PgSQL database installation process

1. yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.

2. yum install postgresql95 -y

3. yum install postgresql95-server -y
Initialize the database/usr/pgsqL-9.5/bin/postgresQL95-setup initdb 5. SystemctlenablePostgresql 9.5 6. Modify the/var/lib/PGSQL / 9.5 / data/postgresql conf line like listen_addresses =The '*'7. Modify the/var/lib/PGSQL / 9.5 / data/pg_hba. Conf# "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 MD5 host all All 0.0.0.0/0 MD5 host All All ::/0 md5 8. Systemctl start postgresqL-9.5Copy the code

Create the libraries required by KONG in PgSQL

1. sudo -u postgres psql

Create user kong
2. CREATE USER kong;

Create a database for user kong
3. CREATE DATABASE kong OWNER kong;

# Change the passwords of users Kong and Postgres
4. ALTER USER kong WITH PASSWORD 'password'; ALTER USER postgres WITH PASSWORD 'password';

Restart the PostgresQL service5. Systemctl restart postgresqL-9.5 6. Reconfigure pg_host = 127.0.0.1 in PGSQL (/etc/kong/kong.conf) in kong# Host of the Postgres server.
pg_port = 5432                  # Port of the Postgres server.
pg_user = kong                  # Postgres user.
pg_password = password          # Postgres user's password.
pg_database = kong              # The database name to connect to.

After exiting the database, start the database
7. kong migrations bootstrap [-c /path/to/kong.conf]

8. kong start [-c /path/to/kong.conf]
Copy the code
  • Check whether the installation is successfulThe curl -i http://127.0.0.1:8001

Install KongA (Visual Operation Interface)

# enter the PGSQL
1. sudo -u postgres psql

Create the database konga needs
2. CREATE DATABASE konga OWNER kong;

Copy the code

Download address Installation Instructions Usage instructions