Install the dependencies:
OpenResty 22.214.171.124. 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-ipv6 \ --with-http_realip_module \ --with-http_ssl_module \ --with-http_stub_status_module \ --without-luajit-lua52
You might have to specify
--with-openssland you can add any other option you'd like, such as additional Nginx modules or a custom
$ export PATH="$PATH:/usr/local/openresty/bin"
Luarocks 2.4.2, compiled with the LuaJIT version bundled with OpenResty (See the
--with-lua-includeconfigure options). Example:
./configure \ --lua-suffix=jit \ --with-lua=/usr/local/openresty/luajit \ --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1
Finally, the Serf v0.7.0 executable should be available in your
$PATH. You can also use it from a custom location assuming you configure Kong's
serf_pathproperty accordingly (or use the
KONG_SERF_PATHenvironment variable). This property should specify the absolute path to the
Consulting the setup_env.sh CI script is a good resource for a concrete example of those instructions. Notice how Serf is used from a custom location which is specified using the environment variable in run_tests.sh.
Now that OpenResty and other third-party dependencies are installed, we can use Luarocks to install Kong's Lua sources:
$ luarocks install kong 0.10.3-0
$ git clone [email protected]:Mashape/kong.git $ [sudo] make install # this simply runs the `luarocks make kong-*.rockspec` command
Finally, place the
bin/kongscript in your
Configure your database
$ kong start # Kong is running $ curl 127.0.0.1:8001
Quickly learn how to use Kong with the 5-minute Quickstart.
Having Trouble? We're Here to Help!