手动编译耗子面板安装的OpenResty

Thun888 2026-10-27 00:10:42 累计浏览 114 次

前天下午上传图片时发现服务器OpenResty崩了,手动启动报错Illegal instruction

说实话我看到这报错还是挺懵的,看了一眼CPU型号发现是二代E5

原图已失效

明明之前是四代的,还偷偷降配置了?
旧E5不支持AVX2指令集,原先编译好的无法运行
发工单问了下,说我这套餐“不承诺CPU型号”,虽然很不爽,但又拿他没办法,事已至此先重新编译下吧

命令

安装是在内置的”应用“里安装的,需要找到安装时执行了什么命令才好复原。我用DeepWiki索引了该面板的仓库,找到了相关的api接口,获取到路径后下载脚本(dl.acepanel.net/nginx/install.sh)

找到安装脚本就好办了,重新执行以下命令即可

install.sh
cd /www/server/nginx/src/ngx_brotli/deps/brotli
rm -r out
mkdir out && cd out
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -march=native -mtune=native -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -march=native -mtune=native -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed ..
cmake --build . --config Release --target brotlienc


cd /www/server/nginx/src/
make clean
./configure --user=www --group=www \
    --prefix=/www/server/nginx \
    --add-module=/www/server/nginx/src/ngx_cache_purge \
    --add-module=/www/server/nginx/src/nginx-sticky-module \
    --with-openssl=/www/server/nginx/src/openssl \
    --with-openssl-opt="no-tests enable-ktls" \
    --with-pcre=/www/server/nginx/src/pcre2 --with-pcre-jit \
    --with-ld-opt="-Wl,-s -Wl,-Bsymbolic -Wl,--gc-sections" \
    --with-cc-opt="-march=native -mtune=native -Ofast -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" \
    --with-file-aio \
    --with-threads \
    --with-compat \
    --with-http_v2_module --with-http_v3_module \
    --with-http_slice_module \
    --with-stream --with-stream_ssl_module --with-stream_realip_module --with-stream_ssl_preread_module \
    --with-http_stub_status_module \
    --with-http_ssl_module \
    --with-http_image_filter_module \
    --with-http_gzip_static_module --with-http_gunzip_module \
    --with-http_sub_module \
    --with-http_flv_module \
    --with-http_addition_module \
    --with-http_realip_module \
    --with-http_mp4_module \
    --with-http_auth_request_module \
    --with-http_secure_link_module \
    --with-http_random_index_module \
    --with-http_dav_module \
    --add-module=/www/server/nginx/src/nginx-dav-ext-module \
    --add-module=/www/server/nginx/src/ngx_http_security_headers_module \
    --add-module=/www/server/nginx/src/ngx_http_trim_filter_module \
    --add-module=/www/server/nginx/src/ngx_brotli \
    --add-module=/www/server/nginx/src/ngx_http_zstd_module
make -j$(nproc)
make install

注:安装脚本里与面板程序的交互已经是新版本的了,完全不兼容旧版本,换句话说旧版本里应用商店用不了了。天天破坏性变更

同分类推荐文章

  1. NGINX Gateway Fabric 2.8: IP allow and deny lists, passive health checks, and cookie-based session persistence (2026-11-14 01:10:02)
  2. NGINX Ingress Controller 5.7: HTTP/2 to your upstreams, Opaque Secrets, and cert-manager challenges behind HTTPS redirects (2026-11-14 00:10:02)
  3. Hexo 文章一键发布到微信公众号 (2026-11-13 19:10:02)

查看更多 DevOps 文章 →

建议继续学习

  1. 配置Nginx+uwsgi更方便地部署python应用 (累计阅读 109,257)
  2. 搜狐闪电邮箱的 Nginx/Postfix 使用模式 (累计阅读 34,259)
  3. 记录一个软中断问题 (累计阅读 17,392)
  4. 解析nginx负载均衡 (累计阅读 17,001)
  5. Nginx模块开发入门 (累计阅读 11,531)
  6. server日志的路径分析 (累计阅读 11,500)
  7. Cacti 添加 Nginx 监控 (累计阅读 11,297)
  8. 检查nginx配置,重载配置以及重启的方法 (累计阅读 11,291)
  9. fsockopen 异步处理 (累计阅读 10,806)
  10. 使用Squid缓存视频 (累计阅读 10,589)