Api gateway kong learning: (1) installation

Reference official website: https://docs.konghq.com/install/ubuntu/?_ga=2.81357461.380117610.1545125991-1274142867.1544940793

1. Download the installation package

My virtual machine is Ubuntu 16.04, so click on the 16.04 installation package in the figure below

 2. Installation process

1. After the installation package is downloaded, use the following command to install

 $ sudo apt-get update
 $ sudo apt-get install openssl libpcre3 procps perl
 $ sudo dpkg -i kong-community-edition-0.14.1.*.deb

 2. Prepare the database

Refer to my other article https://mp.csdn.net/postedit/85093894

The article describes how to install the Postgresql database and create a database named kong and a user named kong in it

After configuration, run the following command to initialize the database:

kong migrations up [-c /path/to/kong.conf]

3. Modify the configuration file of Kong

cd /etc/kong

cp kong.conf.default kong.conf

Edit kong.conf to configure kong to use Postgresql database information

4. Start kong

$ kong start [-c /path/to/kong.conf]

5. Use kong

$ curl -i http://localhost:8001/

 The running effect is as follows:

 

 

Guess you like

Origin blog.csdn.net/kh815/article/details/85096298