LNMP smooth upgrade & re-compile and install the ngx_luamodule module

Source: Internet
Author: User
# Ngx_luamodule project address https://github.com/chaoslawful/lua-nginx-module After the LNMP installation package is installed, recompile nginx and add ngx_lua Module 1 "Downloadwget http://luajit.org/download/LuaJIT-2.0.2.tar.gzwg # Ngx_lua module project address https://github.com/chaoslawful/lua-nginx-module After the LNMP installation package is installed, recompile nginx and add ngx_lua Module 1 "Downloadwget http://luajit.org/download/LuaJIT-2.0.2.tar.gzwg Et https://github.com/simpl/ngx_devel_kit/archive/v0.2.19.tar.gzwget https://github.com/chaoslawful/lua-nginx-module /Archive/v0.9.1.tar.gz the latest stable nginx version is 1.4.3. get the wget http://nginx.org/download/nginx-1.4.3.tar.gz2 Install LuaJITtar-zxvf LuaJIT-2.0.2.tar.gzcd LuaJIT-2.0.2makemake installexport LUAJIT_LIB =/usr/local/libexport LUAJIT_INC =/usr/local/include/luajit-2.03 copy module unzip the downloaded ngx_devel_kit and lua-nginx-module to the/usr/local/src Directory, that is/usr/local/src/lua-nginx-module-0.9.1 // usr/local/src/ngx_devel_kit-0.2.19/3 "re-compile Nginx unzip nginx package, configure (refer to LNMP installation package, no other modifications added ). /configure -- user = www -- group = www -- prefix =/usr/local/nginx -- with-ld-opt = "-Wl,-rpath, $ LUAJIT_LIB "-- with-http_stub_status_module -- with-http_ssl_module -- with-http_gzip_static_module -- with-ipv6 \ -- add-module =/usr/local/src/lua-nginx-module-0.9.1/\ -- add-module =/usr/local/src/ngx_devel_kit-0.2.19 /make after OK, do not make install, otherwise it overwrites installation 4. after the backup is replaced with make, nginx is added to the objs directory, that is, the new version of the program backs up the old nginx program cp/usr/local/nginx/sbin/nginx. the new bak nginx program overwrites the old cp objs/nginx/usr/local/nginx/sbin/nginx to test whether the new nginx program is correct/usr/local/nginx/sbin/nginx-tnginx: theconfiguration file/usr/local/nginx/conf/nginx. conf syntax is oknginx: configuration file/usr/local/nginx/conf/nginx. conf test issuccessful smooth restart nginx/usr/local/nginx/sbin/nginx-s reload view ngixn version and its compilation parameters/usr/local/nginx/sbin/nginx-V "problem solving "1. if you cannot find the library file echo "/usr/local/lib">/etc/ld. so. conf. d/usr_local_lib.confldconfig. /usr/local/nginx/sbin/nginx: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory during Nginx compilation, you need to specify the RPATH, remember to add the following options :. /configure -- with-ld-opt = "-Wl,-rpath, $ LUAJIT_LIB" or export LD_LIBRARY_PATH =/usr/local/lib/: $ LD_LIBRARY_PATH Referer: http://www.2cto.com/os/201311/259514.html
Http://www.2cto.com/ OS /201311/259515.html http://www.2cto.com/ OS /201311/259516.html
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.