Install and Run
- Download Kong OSS v1.5 for RHEL:
curl -Lo kong-1.5.0.rhel7.amd64.rpm $( rpm --eval "https://download.konghq.com/gateway-1.x-rhel-7/Packages/k/kong-1.5.0.rhel7.amd64.rpm")
- Install it:
sudo yum install kong-1.5.0.rhel7.amd64.rpm
- Init configuration to use YAML file instead of database, following command create
kong.yml
in home directory:kong config init
- Create kong configuration file from the default file:
cd /etc/kong
sudo cp kong.conf.default kong.conf
- Change configuration file so it is aware of the YAML declarative configuration file:
database = off
declarative_config = /home/apiteam/kong.yml
- Run Kong migrations:
kong migrations bootstrap
- Add
kong
path to$PATH
of sudoersecure_path
(2): by runningsudo visudo
and edit the secure path line:
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
-
Change
admin_listen
to allow connection from any client(3):-#admin_listen = 127.0.0.1:8001, 127.0.0.1:8444 ssl
+admin_listen = 0.0.0.0:8001, 127.0.0.1:8444 ssl - Start Kong:
sudo kong start
-
Verify the installation by checking the Admin API:
curl -l http://localhost:8001`
It should return200
status code
Note
- By default, Kong listens on the following ports:
- :8000: Port on which listens for incoming HTTP traffic from your clients, and forwards it to your upstream services.
- :8443: Port on which listens for incoming HTTPS traffic. This port has similar behavior as the :8000 port, except that it expects HTTPS traffic only.
- :8001: Port on which the Admin API used to configure listens.
- :8444: Port on which the Admin API listens for HTTPS traffic.
References
- Install Kong Gateway on RHEL
- How to set path for sudo commands
- Securing the Admin API > Network Layer Access Restrictions
Other Resources
- Blog Articles:
- Kong Officials:
- Tools:
- Konga: Admin GUI
- YouTube: