Kong开发环境搭建

时间:2020-03-28 11:27:42   收藏:0   阅读:159

1、OpenResty 1.15.8.2. Kong being an OpenResty application, you must follow the OpenResty installation instructions. You will need OpenSSL and PCRE to compile OpenResty, and to at least use the following compilation options:

 $ ./configure    --with-pcre-jit    --with-http_ssl_module    --with-http_realip_module    --with-http_stub_status_module    --with-http_v2_module

You might have to specify --with-openssl and you can add any other option you’d like, such as additional Nginx modules or a custom --prefix directory.

OpenResty conveniently bundles LuaJIT and resty-cli which are essential to Kong. Add the nginx and resty executables to your $PATH:

export PATH="$PATH:/usr/local/openresty/bin"

2、安装库管理器

Luarocks 3.2.1, compiled with the LuaJIT version bundled with OpenResty (See the --with-lua and --with-lua-include configure options). Example:

 ./configure    --lua-suffix=jit    --with-lua=/usr/local/openresty/luajit    --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1


3、Install Kong

Now that OpenResty is installed, we can use Luarocks to install Kong’s Lua sources:

 $ luarocks install kong 2.0.2-0

Or:

 $ git clone git@github.com:Kong/kong.git
 $ cd kong
 $ [sudo] make install # this simply runs the `luarocks make kong-*.rockspec` command
Finally, place the bin/kong script in your $PATH.
 
 

原文:https://www.cnblogs.com/justart/p/12586234.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!