当前位置:首页 > 教程 > 正文内容

甲骨文ARM宝塔安装原版Nginx问题

2026-05-30教程15

如果要安装原版,按照以下操作即可,可以安装最新的1.31,但是防火墙等插件安装不了,会提示ARM只能用OpenResty。

mkdir -p /www/server/lua && cd /www/server/lua
git clone https://github.com/vision5/ngx_devel_kit.git
git clone https://github.com/openresty/lua-nginx-module.git
git clone https://github.com/openresty/lua-resty-core.git
git clone https://github.com/openresty/lua-resty-lrucache.git
git clone https://github.com/openresty/luajit2.git
cd luajit2
make && make install
export LUAJIT_LIB=/usr/local/lib
export LUAJIT_INC=/usr/local/include/luajit-2.1

编译安装nginx,添加以下:

--add-module=/www/server/lua/ngx_devel_kit  --add-module=/www/server/lua/lua-nginx-module

SSH继续执行:

# 先把可能残留的旧库清掉
rm -rf /www/server/nginx/lib/lua/resty
cd /www/server/lua/lua-resty-core
make install LUA_LIB_DIR=/www/server/nginx/lib/lua
cd /www/server/lua/lua-resty-lrucache
make install LUA_LIB_DIR=/www/server/nginx/lib/lua

这样nginx就安装完了。如果要装插件用不了,还是得安装OpenResty,如果不用插件无所谓。


OpenResty安装:

openresty='1.25.3.2'

openresty127='1.27.1.2'

因为添加了模块,所以要卸载后,把编译添加的模块去掉,再安装即可。最新版1.29出来了,修复了漏洞,但是宝塔还没更新,估计还要等几天。



打赏 支付宝打赏 微信打赏

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。