This is my summary of the installation for your reference:
The latest Nginx, LuaJIT, ngx_devel_kit, and lua-nginx-module installation files are required:
Nginx
LuaJIT Lua or LuaJIT can be used, but for performance consideration, it is recommended to install LuaJIT
Ngx_devel_kit
Lua-nginx-module
Download the following command:
$ Curl-O http://nginx.org/download/nginx-1.10.1.tar.gz$ curl-O route curl-L-O https://github.com/openresty/lua-nginx-module/archive/v0.10.5.tar.gz
Install LuaJIT
$ Wget http://luajit.org/download/LuaJIT-.tar.gz $ tar zxvf LuaJIT-.tar.gz $ cd LuaJIT-$ make $ sudo make install
Compile and install lua-nginx-module
Export LUAJIT_LIB =/usr/local/libexport LUAJIT_INC =/usr/local/include/luajit-2.1cd nginx-1.10.1. /configure -- prefix =/opt/nginx -- with-ld-opt = "-Wl,-rpath, /usr/local/lib "-- add-module =/path/to/ngx_devel_kit-0.3.0 -- add-module =/path/to/nginx/lua-nginx-module-0.10.5makemake install
Dynamic module mode
Nginx 1.9.11 can be used to compile a module as a dynamic module and run the./configure command? Add-dynamic-module = PATH replacement? Add-module = PATH. After compilation, you can use load_module in nginx. conf configuration to dynamically load this module:
Load_module/path/to/modules/ndk_http_module.so; load_module/path/to/modules/ngx_http_lua_module.so; lua cjson install
Eureka Zuul Gateway
To install and compile cjson, you need to modify the LUA_VERSION, LUA_INCLUDE_DIR, and LUA_CMODULE_DIR parameters in the MakeFile before lua is run. This allows the cjson module to know the lua library file and header file directory for normal compilation and installation.
Download and decompress:
Wget http://www.kyne.com.au /~ Mark/software/download/lua-cjson-2.1.0.tar.gztar-zxvf cjson-2.1.0.tar.gzcd cjson-2.1.0
Modify MakeFile:
LUA_VERSION = luajit-2.1LUA_INCLUDE_DIR = $ (PREFIX)/include/$ (LUA_VERSION) LUA_CMODULE_DIR = $ (PREFIX)/libmake & sudo make installsudo cp cjson. so/usr/local/lib/lua/5.1/