当前位置: 首页 > news >正文

现在建网站/品牌营销案例

现在建网站,品牌营销案例,微网站搭建平台,浙江网站建设平台Kong is a cloud-native, fast, scalable, and distributed Microservice API Gateway背景虽然Kong已经出到了2.0,但是因为之前是基于Kong 1.2.1做的扩展开发,所以这里讲解Kong的源码、开发环境搭建都是基于1.2.1版本,后续的版本也可以按照这…
dd98fc8ab6e66ab820275e74c87f90d4.png

Kong is a cloud-native, fast, scalable, and distributed Microservice API Gateway

背景

虽然Kong已经出到了2.0,但是因为之前是基于Kong 1.2.1做的扩展开发,所以这里讲解Kong的源码、开发环境搭建都是基于1.2.1版本,后续的版本也可以按照这个流程走,只是各个组件的版本不一样而已。

依赖版本

0. kong 基于1.2.1的扩展

1. openresty 1.13.6.2

2. luarocks 2.4.3

安装依赖

ibyaml-devel.x86_64

安装yaml包`yum install libyaml-devel.x86_64`

如果没有yaml包,在执行`/data/app/luarocks/bin/luarocks make`编译kong的时候会报错:

Error: Failed installing dependency: https://luarocks.org/lyaml-6.2.3-1.src.rock - Could not find library file for YAML  No file libyaml.a in /usr/local/lib  No file libyaml.a in /usr/local/lib64  No file libyaml.so in /usr/local/lib  No file libyaml.so in /usr/local/lib64  No file matching libyaml.so.* in /usr/local/lib  No file matching libyaml.so.* in /usr/local/lib64  No file libyaml.a in /usr/lib  No file libyaml.a in /usr/lib64  No file libyaml.so in /usr/lib  No file libyaml.so in /usr/lib64  No file matching libyaml.so.* in /usr/lib  No file matching libyaml.so.* in /usr/lib64You may have to install YAML in your system and/or pass YAML_DIR or YAML_LIBDIR to the luarocks command.Example: luarocks install lyaml YAML_DIR=/usr/local

安装openssl

下载openssl源码解压缩备用

使用openssl1.1.0l版本,需要将kong依赖中的luaossl版本改为:20190612(luaossl依赖openssl,所以一定需要先安装对应的openssl)

cd /data/server/kongwget https://www.openssl.org/source/openssl-1.1.0l.tar.gztar -xf openssl-1.1.0l.tar.gzroot用户下安装opensslcd openssl-1.1.0l./config shared zlibmake & make installmv /usr/bin/openssl /usr/bin/openssl.bakfind / -name opensslln -s /usr/local/bin/openssl /usr/bin/opensslecho "/usr/local/lib64/" >> /etc/ld.so.confldconfigopenssl version -a

测试openssl安装结果

openssl version -a输出如下内容OpenSSL 1.1.0l 10 Sep 2019built on: reproducible build, date unspecifiedplatform: linux-x86_64......

安装openresty

下载编译安装Openresty

wget https://openresty.org/download/openresty-1.13.6.2.tar.gz

./configure   --with-pcre-jit   --with-ipv6   --with-http_realip_module   --with-http_ssl_module   --with-http_stub_status_module   --with-http_v2_module   --prefix=/data/app/openresty   --with-openssl=/data/server/kong/openssl-1.1.0l

修改环境变量

vi ~/.bash_profileexport PATH="$PATH:/data/app/openresty/bin"export PATH="$PATH:/data/app/openresty/luajit/lib"export PATH="$PATH:/data/app/openresty/luajit/include/luajit-2.1"source ~/.bash_profile 

安装luarocks

下载编译安装luarocks

wget https://github.com/luarocks/luarocks/archive/2.4.3.zip./configure   --lua-suffix=jit   --prefix=/data/app/luarocks   --with-lua=/data/app/openresty/luajit   --with-lua-include=/data/app/openresty/luajit/include/luajit-2.1make buildmake install

修改环境变量

vi ~/.bash_profileexport PATH="$PATH:/data/app/luarocks/bin"export LUA_PATH="/data/app/luarocks/share/lua/5.1/?.lua"source ~/.bash_profile 

编译安装kong

上传kong的源码,或者下载官方源码

解压缩,进入源码根目录,执行`/data/app/luarocks/bin/luarocks make`

最后输出表示安装成功

kong 1.2.1-0 is now installed in /data/app/luarocks (license: Apache 2.0)

再再修改一环境变量

export PATH="$PATH:/data/server/kong/kong/bin"

修改配置

根据需要修改配置文件,启动服务

初始化环境

第一次使用Kong需要对环境初始化,初始化主要是将核心的表在数据库中进行创建、数据插入。

启动服务

通过bin/kong start -c kong.conf 启动服务。

http://www.jmfq.cn/news/4969909.html

相关文章:

  • 护肤品 网站建设策划书/seo蜘蛛池
  • 怎么自己做彩票网站/seo代码优化工具
  • 长春seo网站建设费用/技能培训
  • 小说网站开发的看书软件/seo值是什么意思
  • 网站流量如何盈利/天津百度推广电话号码
  • 承德市网站开发/磁力宝最佳搜索引擎入口
  • django网站开发实例源码/做app推广去哪找商家
  • 医社保增减员在什么网站做/现在网络推广方式
  • 要建一个网站该怎么做/知乎推广合作
  • 龙华专业做网站/百度竞价代理公司
  • 做水果的有什么网站/石家庄百度seo排名
  • 人才网站源码/外贸获客软件
  • 自动化科技产品网站建设/域名ip地址在线查询
  • 鞍山网站怎么做出来的/上海百度推广公司排名
  • 自建站什么意思/网络营销常见的工具
  • seo网站营销/西安网站定制开发
  • 建设公司网站靠谱吗/企业宣传推广
  • 网站备案提交资料/全网优化推广
  • 做海鲜团购网站/独立站怎么搭建
  • 合肥网站搜索优化/百度q3财报2022
  • 什么网站程序可以做抽奖页面/谷歌seo优化推广
  • 广西建设工程质检安全网站/如何做网页制作
  • 早期做的网站支持现在的网速吗/营销策划是做什么
  • app在线制作网站/怎么注册百度账号
  • 用vs做网站后台/网站搜索引擎优化方法
  • 微商/宁德seo培训
  • 东莞长安网站推广公司/微信客户管理系统
  • 网站开发销售员/semifinal
  • wordpress 分类目录树/石家庄seo管理
  • 百度公司给做网站吗/交易平台