Last update at :2024-06-21,Edit by888u
Snail received an email from a netizen, mentioning how to install OpenResty's lua extension in LNMP (Jun Ge's one-click WEB installation package). Generally, Lua is rarely installed in the WEB environment of websites. If it is a oneinstack one-click package environment, you can directly choose to install OpenResty, but LNMP is not directly installed automatically.
Snail saw the solution mentioned in the forum (https://bbs.vpser.net/thread-14061-1-1.html). Snail followed this method to install and test in the test machine environment without any problem, so Also record this method. If we need to install OpenResty's lua extension in the LNMP environment, we can refer to it. However, we must remember that we need to back up the existing production environment to avoid problems that require timely restoration and other solutions.
First, quick compilation and installation
cd /rootwget -c https://soft.laozuo.org/openresty/LuaJIT-2.0.4.tar.gztar zxf LuaJIT-2.0.4.tar.gzcd LuaJIT-2.0.4makemake install PREFIX=/usr/ local/luajitcd ..
wget -c https://github.com/openresty/lua-nginx-module/archive/v0.10.5.tar.gztar zxf v0.10.5.tar.gz
wget -c https://github.com/simpl/ngx_devel_kit/archive/v0.3.0.tar.gztar zxf v0.3.0.tar.gz
export LUAJIT_LIB=/usr/local/luajit/libexport LUAJIT_INC=/usr/local/luajit/include/luajit-2.0
cat > /etc/ld.so.conf.d/luajit.conf< ldconfig Second, edit the configuration file lnmp.conf In the file Nginx_Modules_Options add: –with-ld-opt=-Wl,-rpath,/usr/local/luajit/lib –add-module=/root/lua-nginx-module-0.10.5 –add-module=/root/ngx_devel_kit -0.3.0 Third, re-upgrade Nginx
upgrade.sh To perform the upgrade, select nginx. Here we still use the current version directly. After the upgrade is completed, you will see:
After upgrading Nginx, there will be no problems at least in Snail's test environment.
In this way, we can install OpenResty's lua extension in the LNMP environment.
Recommended site searches: IP segment query, wordpress host, server in the United States, which foreign server rental is best, station group server rental, Korean virtual host space server, Chinese domain name fee, Korean virtual host,
发表评论