ubuntu18.04安装nginx+lua

./configure \
–prefix=/usr/local/nginx \
–with-ld-opt=’-Wl,-rpath,/usr/local/luajit/lib -Wl,-rpath,/usr/local/lib’ \
–user=www \
–group=www \
–with-cc-opt=-O2 \
–add-module=../ngx_devel_kit-0.3.0 \
–add-module=../echo-nginx-module-0.61 \
–add-module=../xss-nginx-module-0.06 \
–add-module=../ngx_coolkit-0.2 \
–add-module=../set-misc-nginx-module-0.32 \
–add-module=../form-input-nginx-module-0.12 \
–add-module=../encrypted-session-nginx-module-0.08 \
–add-module=../srcache-nginx-module-0.31 \
–add-module=../lua-nginx-module-0.10.14 \
–add-module=../lua-upstream-nginx-module-0.07 \
–add-module=../headers-more-nginx-module-0.33 \
–add-module=../array-var-nginx-module-0.05 \
–add-module=../memc-nginx-module-0.19 \
–add-module=../redis2-nginx-module-0.15 \
–add-module=../redis-nginx-module-0.3.9 \
–add-module=../rds-json-nginx-module-0.15 \
–add-module=../rds-csv-nginx-module-0.09 \
–add-module=../stream-lua-nginx-module-0.0.6 \
–http-log-path=/home/log/nginx/nginx.access.log \
–error-log-path=/home/log/nginx/nginx.error.log \
–pid-path=/usr/local/nginx/tmp \
–with-http_stub_status_module \
–with-http_ssl_module \
–with-http_gzip_static_module \
–with-http_sub_module \
–with-http_realip_module \
–with-http_realip_module \
–with-pcre \
–add-module=../ngx_cache_purge-2.3 \
–add-module=../nginx_upstream_check_module-0.3.0 \
–with-stream –with-stream_ssl_module

adding module in ../lua-nginx-module-0.10.14
checking for Lua library … not found
checking for Lua library in /usr/local/ … not found
checking for Lua library in /usr/local/ … not found
checking for Lua library in /usr/pkg/ … not found
checking for Lua library in /opt/local/ … not found
checking for Lua library in /usr/local/*/lua51/ … not found
checking for Lua library in /usr/ … not found
checking for LuaJIT library in /usr/local/ … not found
checking for LuaJIT library in /usr/ … not found
checking for LuaJIT library in /usr/ … not found
./configure: error: ngx_http_lua_module requires the Lua library.

安装luajit

# tell nginx’s build system where to find LuaJIT 2.0:
export LUAJIT_LIB=/path/to/luajit/lib
export LUAJIT_INC=/path/to/luajit/include/luajit-2.0

# Here we assume Nginx is to be installed under /opt/nginx/.
./configure –prefix=/opt/nginx \
–with-ld-opt=”-Wl,-rpath,/path/to/luajit-or-lua/lib” \
–add-module=/path/to/ngx_devel_kit \
–add-module=/path/to/lua-nginx-module

# Note that you may also want to add `./configure` options which are used in your
# current nginx build.
# You can get usually those options using command nginx -V

# you can change the parallism number 2 below to fit the number of spare CPU cores in your
# machine.
make -j2
make install

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据