Kong Gateway Enterprise [ARCHIVE]
0.31-x
Install Kong Enterprise and PostgreSQL onto Amazon Linux
Download Kong Gateway
-
To install Kong Gateway versions 1.3.x and earlier, open a support case to request an authenticated time-sensitive URL.
-
Click the URL to download your Kong Gateway installation package.
Obtain your Kong Enterprise license
Kong Gateway requires a license to run.
If you have lost access to your license.json
file but still have a valid
license for Kong Gateway (Enterprise), open a
support case to request the file.
-
Download the
license.json
file you received from Kong Support. -
Open the file and ensure it’s in proper JSON format:
{"license":{"signature":"91e6dd9716d12ffsn4a5ckkb16a556dbebdbc4d0a66d9b2c53f8c8d717eb93dd2bdbe2cb3ef51c20806f14345128907da35","payload":{"customer":"Kong Inc","license_creation_date":"2019-05-07","product_subscription":"Kong Enterprise Edition","admin_seats":"5","support_plan":"None","license_expiration_date":"2021-04-01","license_key":"00Q1K00000zuUAwUAM_a1V1K000005kRhuUAE"},"version":1}}
Install Postgres
$ sudo yum install postgresql95 postgresql95-server
$ sudo service postgresql95 initdb
$ sudo service postgresql95 start
$ sudo -i -u postgres (puts you into new shell)
Create kong
user
$ psql
> CREATE USER kong; CREATE DATABASE kong OWNER kong; ALTER USER kong WITH password 'kong';
> \q
$ exit
Add required DB and Kong settings
# Change entries from ident to md5
$ sudo vi /var/lib/pgsql95/data/pg_hba.conf
$ sudo service postgresql95 restart
# add contents of license file (copy and paste)
$ sudo vi /etc/kong/license.json
# Uncomment and add 'kong' to pg_password line
$ sudo vi [/path/to/kong.conf]
# Run migrations and start kong
$ kong migrations up [-c /path/to/kong.conf]
$ sudo /usr/local/bin/kong start [-c /path/to/kong.conf]
Note: You may use kong.conf.default
or create your own configuration.
Test your Kong installation
$ curl -X POST \
--url 'http://localhost:8001/apis' \
--data 'name=demo' \
--data 'uris=/' \
--data 'upstream_url=http://httpbin.org'
$ curl -X GET --url 'http://localhost:8000/ip'
Setup Admin GUI
# Get the local IP address
$ ifconfig
# Uncomment the admin_listen setting, and update to
# something like this `admin_listen = 172.31.3.8:8001`
$ sudo vi [/path/to/kong.conf]
# Restart kong
$ sudo /usr/local/bin/kong stop
$ sudo /usr/local/bin/kong start [-c /path/to/kong.conf]
In a browser, load your server on port 8002