我目前已经从源码编译了lighttpd
./configure --prefix=/home/lighttpd \
--without-pcre \
--without-zlib \
--without-bzip2
我还尝试了 -enable-static --disable-shared 选项,但模块仍然从 lib 目录加载
我想将所有 lighttpd 模块编译为单个二进制文件,而不是从 lib 目录加载,该怎么做?
最佳答案
交叉发布到https://redmine.lighttpd.net/boards/3/topics/6615
Lighttpd 可以使用 SCons 或使用 make 静态构建。简而言之:
缺点:
$ scons -j 4 build_static=1 build_dynamic=0 prefix=/custom/inst/path install
品牌:
# 编辑 src/Makefile.am 并在“if LIGHTTPD_STATIC”下的部分中,使用要包含在静态构建中的每个模块更新 lighttpd_SOURCES,或者仅使用已有的整个列表
$ LIGHTTPD_STATIC=yes ./configure -C --enable-static=yes
$ 制作
更多详细信息请参见https://redmine.lighttpd.net/boards/3/topics/5912
[编辑] 要使用“make”静态构建,请使用lighttpd git master分支或lighttpd 1.4.40+
关于c - 如何静态编译lighttpd模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37077497/