API gateway 之 kong 安装
kong安装:
https://getkong.org/install/centos/
下载指定版本rpm:
wget https://bintray.com/kong/kong-community-edition-rpm/download_file?file_path=centos/7/kong-community-edition-0.12.3.el7.noarch.rpm
yum install epel-release
yum install xxx.rpm
kong数据库安装:
kong支持2种数据库存储(postgreSQL 和 Cassandra )
postgreSQL官网:https://www.postgresql.org/download/
Cassandra官网:http://cassandra.apache.org/download/
安装postgreSQL:
yum install https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm
yum install postgresql94
yum install postgresql94-server
/usr/pgsql-9.4/bin/postgresql94-setup initdb
修改postgreSQL配置文件:
vim /var/lib/pgsql/9.4/data/postgresql.conf
修改为:listen_addresses = '*'
vim /var/lib/pgsql/9.4/data/pg_hba.conf
修改为:host all all 127.0.0.1/32 trust
启动postgreSQL:
systemctl enable postgresql-9.4
systemctl start postgresql-9.4
创建kong需要的库、授权 并 把相关的数据写入库:
#su - postgres
-bash-4.2$ psql
postgres=# CREATE USER kong; CREATE DATABASE kong OWNER kong;
postgres=# \ # kong migrations up
启动kong:
# cp /etc/kong/kong.conf.default /etc/kong/kong.conf
# kong start
# curl -i -X GET http://localhost:8001/
HTTP/1.1 200 OK
Date: Thu, 10 May 2018 07:43:18 GMT
....
安装kong-dashboard:
安装说明:https://github.com/PGBI/kong-dashboard
安装kong管理工具的环境依赖 nodejs 及 npm
nodejs 及 npm安装教程:https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora
curl --silent --location https://rpm.nodesource.com/setup_9.x | sudo bash -
yum install -y nodejs
npm install -g kong-dashboard
nohup kong-dashboard start --kong-url http://0.0.0.0:8001 & 也可以基于basic 认证,在登录是要求输入密码
nohup kong-dashboard start --kong-url http://0.0.0.0:8001 --basic-auth admin=123456 &
访问 kong-dashboard http://x,x,x,x:8080 (输入刚刚配置的账号密码):

API gateway 之 kong 安装的更多相关文章
- API gateway 之 kong 安装 (二)
一.系统环境 [root@kong ~]# service iptables status iptables: Firewall is not running. [root@kong ~]# gete ...
- API gateway 之 kong 基本操作 (三)
一.演示环境准备 1.nginx配置 [root@nginx conf.d]# pwd /etc/nginx/conf.d [root@nginx conf.d]# ls conf_bak kong_ ...
- API gateway 之 kong 基本介绍 (一)
一.API网关概念介绍 API 网关,即API Gateway,是大型分布式系统中,为了保护内部服务而设计的一道屏障,可以提供高性能.高可用的 API托管服务,从而帮助服务的开发者便捷地对外提供服务, ...
- API Gateway - KONG 安装与配置
简介 Kong,是由Mashape公司开源的,基于Nginx的API gateway 特点 可扩展,支持分布式 模块化 功能:授权.日志.ip限制.限流.api 统计分析(存在商业插件Galileo等 ...
- Docker安装Kong API Gateway并使用
我最新最全的文章都在南瓜慢说 www.pkslow.com,文章更新也只在官网,欢迎大家来喝茶~~ 1 简介 Kong不是一个简单的产品,本文讲的Kong主要指的是Kong API Gateway,即 ...
- kong API gateway
参考:https://www.cnblogs.com/chenjinxi/p/8724564.html 一.简介 Kong,是由Mashape公司开源的,基于Nginx的API gateway. 二. ...
- 关于kong | API Gateway
目录 为什么需要 API 网关(more) kong的概念 为什么使用Kong Kong 的管理方式 高可扩展性的背后-插件机制 [前言]: Kong是一个云原生,高效,可扩展的分布式 API 网关. ...
- API Gateway : Kong
what problems 多个服务要写自己的log,auth,对于比较耗时的,有时还要高流量限制. solution intro 单点部署的情况: why not just haproxy log ...
- Kong:Nginx支持的API Gateway管理解决方案
Kong的主要功能 Kong可灵活扩展:只要增添更多的服务器实例,它就能横向扩展,毫无问题,那样你可以支持更多流量,同时确保网络延迟很短. Kong可在任何地方运行:它可以部署在单个或多个数据中心环境 ...
随机推荐
- 各大知名区块链交易所链接及API文档链接
区块链交易所链接 火币网(Huobi):https://www.huobi.br.com/zh-cn/ API文档:https://github.com/huobiapi/API_Docs/wiki ...
- python 字符串、列表和元祖之间的切换
>>> s=['http','://','www','baidu','.com'] >>> url=''.join(s) >>> url 'htt ...
- 【剑指offer】二叉搜索树与双向链表
一.题目: 输入一棵二叉搜索树,将该二叉搜索树转换成一个排序的双向链表.要求不能创建任何新的结点,只能调整树中结点指针的指向. 二.思路: 对于一棵搜索二叉树来说,中序遍历得到的即是有序的结果,所以整 ...
- 前端框架之Vue(5)-条件渲染
v-if 在字符串模板中,比如 Django Template语法中,我们得像这样写一个条件块: <!-- Handlebars 模板 --> {%if 1%} <h1>Yes ...
- 创建数据表,自定义data element, field等。
参考:https://wenku.baidu.com/view/253ddbfaa5e9856a561260da.html 一:创建域. 使用T-CODE 11 搜索 数据操作系统. 选择domain ...
- mybatis {arg0} 与 {0}
解决方案: MyBatis的XML的配置文件中声明设置属性的useActualParamName参数值为假 <setting name="useActualParamName" ...
- 【EatBook】-NO.1.EatBook.1.JavaData.1.001-《JSON 必知必会-Introduction to JavaScript Object Notation》-
1.0.0 Summary Tittle:[EatBook]-NO.1.EatBook.1.JavaData.1.001-<JSON 必知必会-Introduction to JavaScrip ...
- 如何使用向量代表文档doc或者句子sentence
1.“句向量”简介word2vec提供了高质量的词向量,并在一些任务中表现良好. 关于word2vec的原理可以参考这几篇论文: https://arxiv.org/pdf/1310.4546.pdf ...
- [Java] Create File with java.io.File class
Create a file with some content in some specific location. The reference is here. /** * Write fileCo ...
- Entity Framework学习初级篇2
Entity Framework 学习初级篇2--ObjectContext.ObjectQuery.ObjectStateEntry.ObjectStateManager类的介绍 本节,简单的介绍E ...