nginx源码编译自定义版本号
1.下载1.20.2源码包 [root@localhost service]# cd /data/build/nginx-1.20.2/ [root@localhost nginx-1.20.2]# ls auto CHANGES CHANGES.ru conf configure contrib html LICENSE Makefile man objs README src 2.在nginx源码包中编辑此文件 src/core/nginx.h 修改: #define nginx_version 1020002 #define NGINX_VERSION "1.20.2" 为: #define nginx_version 1230002 #define NGINX_VERSION "1.23.2" 3.进行配置 ./configure --prefix=/data/service/nginx \ --with-http_stub_status_module \ --with-http_gzip_static_module \ --with-http_ssl_module \ --with-http_mp4_module \ --with-stream \ --with-http_realip_module \ --with-http_v2_module \ --with-http_sub_module \ --with-pcre=../pcre-8.45 \ --with-zlib=../zlib-1.3.1 \ --with-openssl=../openssl-3.3.0 \ --add-module=../nginx-http-flv-module-1.2.11 4.编译 make -j$(nporc) && make install 5.这样就会把nginx1.20.2版本修改为1.23.2,但其内容还是1.20.2的,只是修改了版本号
分类:
nginx
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具
· Manus的开源复刻OpenManus初探