In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "the installation and configuration of Kong gateway". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "the installation and configuration of Kong gateway".
Brief introduction
Kong, open source by Mashape, Nginx-based API gateway
Characteristics
Scalable to support distributed
Modular functions: authorization, logging, ip restrictions, current restrictions, api statistical analysis (commercial plug-ins such as Galileo, etc., can also be developed by yourself), request conversion, cross-domain (CORS), other functions are realized through lua plug-ins
Installation
All the configurations used in the whole process are default.
Download the installation package and show it on the official website: https://getkong.org/install/centos/
Install PostgreSQL before installation
Yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpmyum install postgresql96-server postgresql96-contrib
Initialize the database
/ usr/pgsql-9.6/bin/postgresql96-setup initdb
Modify configuration
Vi / var/lib/pgsql/9.6/data/pg_hba.conf
Start and create the kong database and user rights
Systemctl start postgresql-9.6sudo-I-u postgrespsqlCREATE USER kong; CREATE DATABASE kong OWNER kong
Install and start Kong
$sudo yum install epel-release$ sudo yum install https://kong.bintray.com/kong-community-edition-rpm/centos/7/kong-community-edition-1.0.0.el7.noarch.rpm-- nogpgcheck$ cp / etc/kong/kong.conf.default / etc/kong/kong.conf$ kong migrations bootstrap [- c / etc/kong/kong.conf] $kong start [- c / etc/kong/kong.conf] $curl http://127.0.0.1:8001
Install kong dashboard to provide interface operation support
Git clone https://github.com/PGBI/kong-dashboard.gitcd kong-dashboardsudo npm install-- unsafe-perm-- registry= https://registry.npm.taobao.orgnpm install-g kong-dashboardkong-dashboard start-- kong-url http://127.0.0.1:8001
Visit kong dashboard UI: http://192.168.20.54:8080
Configure API that requires proxies
Route the agent out
Access to: http://192.168.20.54:8000/apis/user/user/zhangsan
At this point, I believe you have a deeper understanding of the "installation and configuration of Kong gateway". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.