当前位置: 首页 > ai >正文

【Nginx】Nginx 最新稳定版本(1.28.0)发布

        根据nginx.org官网显示,2025年4月23日,官方发布了nginx 1.28.0最新稳定版。

        该版本基于最新的 1.27.5 开发版,并且修复了两个Bug。详见:Changes

        官方最新稳定版下载地址:

CHANGES-1.28nginx-1.28.0  pgp​nginx/Windows-1.28.0  pgp
nginx-1.28.0-1.el8.ngx.x86_64.rpm                 23-Apr-2025 13:25             1005588
nginx-1.28.0-1.el9.ngx.x86_64.rpm                 23-Apr-2025 13:25             1042041

        虽然官方并没有在 changes 里面提及该版本不支持CentOS/RHEL 7.9,但是在实际安装测试过程中,确实出现了一些一依赖方面的报错,比如:openssl、zlib。即便尝试了在编译参数中,加入--with-openssl、--with-zlib源码包路径的参数,但是在make步骤中,仍然会出现报错。

# cd /usr/local/src/nginx-1.28.0/
# ./configure --prefix=/data/nginx --with-openssl=/usr/local/src/openssl-3.5.0 --with-zlib=/usr/local/src/zlib-1.3.1 --with-stream --with-stream_ssl_module --with-threads --with-http_ssl_module --with-http_stub_status_module --user=app --group=app

        预编译通过了

checking for OS+ Linux 3.10.0-1160.105.1.el7.x86_64 x86_64
checking for C compiler ... found+ using GNU C compiler+ gcc version: 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) 
checking for gcc -pipe switch ... found
checking for -Wl,-E switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found。。。。。。。。。省略。。。。。。。。。。。checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for sysconf(_SC_LEVEL1_DCACHE_LINESIZE) ... found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
checking for PCRE2 library ... not found
checking for PCRE library ... found
checking for PCRE JIT support ... found
creating objs/MakefileConfiguration summary+ using threads+ using system PCRE library+ using OpenSSL library: /usr/local/src/openssl-3.5.0+ using zlib library: /usr/local/src/zlib-1.3.1nginx path prefix: "/data/nginx"nginx binary file: "/data/nginx/sbin/nginx"nginx modules path: "/data/nginx/modules"nginx configuration prefix: "/data/nginx/conf"nginx configuration file: "/data/nginx/conf/nginx.conf"nginx pid file: "/data/nginx/logs/nginx.pid"nginx error log file: "/data/nginx/logs/error.log"nginx http access log file: "/data/nginx/logs/access.log"nginx http client request body temporary files: "client_body_temp"nginx http proxy temporary files: "proxy_temp"nginx http fastcgi temporary files: "fastcgi_temp"nginx http uwsgi temporary files: "uwsgi_temp"nginx http scgi temporary files: "scgi_temp"

        但是,在make步骤中,报错还是出现了

# make
make -f objs/Makefile
make[1]: 进入目录“/usr/local/src/nginx-1.28.0”
cd /usr/local/src/openssl-3.5.0 \
&& if [ -f Makefile ]; then make clean; fi \
&& ./config --prefix=/usr/local/src/openssl-3.5.0/.openssl no-shared no-threads  \
&& make \
&& make install_sw LIBDIR=lib
Can't locate IPC/Cmd.pm in @INC (@INC contains: /usr/local/src/openssl-3.5.0/util/perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /usr/local/src/openssl-3.5.0/external/perl/Text-Template-1.56/lib) at /usr/local/src/openssl-3.5.0/util/perl/OpenSSL/config.pm line 19.
BEGIN failed--compilation aborted at /usr/local/src/openssl-3.5.0/util/perl/OpenSSL/config.pm line 19.
Compilation failed in require at /usr/local/src/openssl-3.5.0/Configure line 23.
BEGIN failed--compilation aborted at /usr/local/src/openssl-3.5.0/Configure line 23.
make[1]: *** [/usr/local/src/openssl-3.5.0/.openssl/include/openssl/ssl.h] 错误 2
make[1]: 离开目录“/usr/local/src/nginx-1.28.0”
make: *** [build] 错误 2

        下面在AlmaLinux 8.10 / 9.5中安装编译,在线安装了相关的依赖包后,nginx-1.28.0版本的编译、安装过程非常丝滑

# yum install -y curl gcc gcc-c++ openssl openssl-devel pcre pcre-devel zlib zlib-devel 
AlmaLinux 9 - AppStream                                                                                                                                    3.3 kB/s | 4.2 kB     00:01    
AlmaLinux 9 - AppStream                                                                                                                                    1.5 MB/s |  16 MB     00:10    
AlmaLinux 9 - BaseOS                                                                                                                                       3.3 kB/s | 3.8 kB     00:01    
AlmaLinux 9 - BaseOS                                                                                                                                       1.4 MB/s |  19 MB     00:13    
AlmaLinux 9 - Extras                                                                                                                                       2.7 kB/s | 3.3 kB     00:01    
AlmaLinux 9 - Extras                                                                                                                                       9.9 kB/s |  13 kB     00:01    
软件包 curl-7.76.1-31.el9.x86_64 已安装。
软件包 openssl-1:3.2.2-6.el9_5.x86_64 已安装。
软件包 pcre-8.44-4.el9.x86_64 已安装。
软件包 zlib-1.2.11-40.el9.x86_64 已安装。
依赖关系解决。
===========================================================================================================================================================================================软件包                                         架构                                  版本                                                  仓库                                      大小
===========================================================================================================================================================================================
安装:gcc                                            x86_64                                11.5.0-5.el9_5.alma.1                                 appstream                                 32 Mgcc-c++                                        x86_64                                11.5.0-5.el9_5.alma.1                                 appstream                                 13 Mopenssl-devel                                  x86_64                                1:3.2.2-6.el9_5.1                                     appstream                                3.2 Mpcre-devel                                     x86_64                                8.44-4.el9                                            appstream                                469 kzlib-devel                                     x86_64                                1.2.11-40.el9                                         appstream                                 44 k
升级:cpp                                            x86_64                                11.5.0-5.el9_5.alma.1                                 appstream                                 11 Mlibgcc                                         x86_64                                11.5.0-5.el9_5.alma.1                                 baseos                                    84 klibgomp                                        x86_64                                11.5.0-5.el9_5.alma.1                                 baseos                                   260 klibstdc++                                      x86_64                                11.5.0-5.el9_5.alma.1                                 baseos                                   731 kopenssl                                        x86_64                                1:3.2.2-6.el9_5.1                                     baseos                                   1.3 Mopenssl-libs                                   x86_64                                1:3.2.2-6.el9_5.1                                     baseos                                   2.4 M
安装依赖关系:glibc-devel                                    x86_64                                2.34-125.el9_5.1                                      appstream                                 31 kglibc-headers                                  x86_64                                2.34-125.el9_5.1                                      appstream                                435 kkernel-headers                                 x86_64                                5.14.0-503.38.1.el9_5                                 appstream                                3.5 Mlibstdc++-devel                                x86_64                                11.5.0-5.el9_5.alma.1                                 appstream                                2.2 Mlibxcrypt-devel                                x86_64                                4.4.18-3.el9                                          appstream                                 28 kmake                                           x86_64                                1:4.3-8.el9                                           baseos                                   530 kpcre-cpp                                       x86_64                                8.44-4.el9                                            appstream                                 24 kpcre-utf16                                     x86_64                                8.44-4.el9                                            appstream                                183 kpcre-utf32                                     x86_64                                8.44-4.el9                                            appstream                                173 k事务概要
===========================================================================================================================================================================================
安装  14 软件包
升级   6 软件包总下载:71 M
下载软件包:
(1/20): glibc-devel-2.34-125.el9_5.1.x86_64.rpm                                                                                                            179 kB/s |  31 kB     00:00    
(2/20): glibc-headers-2.34-125.el9_5.1.x86_64.rpm                                                                                                          1.1 MB/s | 435 kB     00:00    
(3/20): kernel-headers-5.14.0-503.38.1.el9_5.x86_64.rpm                                                                                                    1.4 MB/s | 3.5 MB     00:02    
(4/20): libstdc++-devel-11.5.0-5.el9_5.alma.1.x86_64.rpm                                                                                                   1.4 MB/s | 2.2 MB     00:01    
(5/20): libxcrypt-devel-4.4.18-3.el9.x86_64.rpm                                                                                                            504 kB/s |  28 kB     00:00    
(6/20): openssl-devel-3.2.2-6.el9_5.1.x86_64.rpm                                                                                                           1.4 MB/s | 3.2 MB     00:02    
(7/20): pcre-cpp-8.44-4.el9.x86_64.rpm                                                                                                                     289 kB/s |  24 kB     00:00    
(8/20): pcre-devel-8.44-4.el9.x86_64.rpm                                                                                                                   1.2 MB/s | 469 kB     00:00    
(9/20): pcre-utf16-8.44-4.el9.x86_64.rpm                                                                                                                   1.2 MB/s | 183 kB     00:00    
(10/20): pcre-utf32-8.44-4.el9.x86_64.rpm                                                                                                                  1.1 MB/s | 173 kB     00:00    
(11/20): zlib-devel-1.2.11-40.el9.x86_64.rpm                                                                                                               680 kB/s |  44 kB     00:00    
(12/20): make-4.3-8.el9.x86_64.rpm                                                                                                                         1.5 MB/s | 530 kB     00:00    
(13/20): gcc-c++-11.5.0-5.el9_5.alma.1.x86_64.rpm                                                                                                          1.4 MB/s |  13 MB     00:09    
(14/20): libgcc-11.5.0-5.el9_5.alma.1.x86_64.rpm                                                                                                           1.1 MB/s |  84 kB     00:00    
(15/20): libgomp-11.5.0-5.el9_5.alma.1.x86_64.rpm                                                                                                          2.0 MB/s | 260 kB     00:00    
(16/20): libstdc++-11.5.0-5.el9_5.alma.1.x86_64.rpm                                                                                                        2.3 MB/s | 731 kB     00:00    
(17/20): openssl-3.2.2-6.el9_5.1.x86_64.rpm                                                                                                                2.4 MB/s | 1.3 MB     00:00    
(18/20): openssl-libs-3.2.2-6.el9_5.1.x86_64.rpm                                                                                                           2.5 MB/s | 2.4 MB     00:00    
(19/20): cpp-11.5.0-5.el9_5.alma.1.x86_64.rpm                                                                                                              1.4 MB/s |  11 MB     00:07    
(20/20): gcc-11.5.0-5.el9_5.alma.1.x86_64.rpm                                                                                                              1.4 MB/s |  32 MB     00:22    
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                                                                       2.9 MB/s |  71 MB     00:24     
AlmaLinux 9 - AppStream                                                                                                                                    121 kB/s | 3.1 kB     00:00    
导入 GPG 公钥 0xB86B3716:Userid: "AlmaLinux OS 9 <packager@almalinux.org>"指纹: BF18 AC28 7617 8908 D6E7 1267 D36C B86C B86B 3716来自: /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux-9
导入公钥成功
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务准备中  :    
。。。。。。。。。。。。。。。。。省略.。。。。。。。。。。。。。

        预编译、编译和安装

# ./configure --prefix=/data/nginx --with-stream --with-stream_ssl_module --with-threads --with-http_ssl_module --with-http_stub_status_module --user=app --group=apps
checking for OS+ Linux 5.14.0-503.16.1.el9_5.x86_64 x86_64
checking for C compiler ... found+ using GNU C compiler+ gcc version: 11.5.0 20240719 (Red Hat 11.5.0-5) (GCC) 
checking for gcc -pipe switch ... found
checking for -Wl,-E switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
。。。。。。。。。省略。。。。。。。。。。。。。。。。
Configuration summary+ using threads+ using system PCRE library+ using system OpenSSL library+ using system zlib librarynginx path prefix: "/data/nginx"nginx binary file: "/data/nginx/sbin/nginx"nginx modules path: "/data/nginx/modules"nginx configuration prefix: "/data/nginx/conf"nginx configuration file: "/data/nginx/conf/nginx.conf"nginx pid file: "/data/nginx/logs/nginx.pid"nginx error log file: "/data/nginx/logs/error.log"nginx http access log file: "/data/nginx/logs/access.log"nginx http client request body temporary files: "client_body_temp"nginx http proxy temporary files: "proxy_temp"nginx http fastcgi temporary files: "fastcgi_temp"nginx http uwsgi temporary files: "uwsgi_temp"nginx http scgi temporary files: "scgi_temp"# make
。。。。。。。。。省略。。。。。。。。。。。。。。。。# make install
make -f objs/Makefile install
make[1]: 进入目录“/usr/local/src/nginx-1.28.0”
test -d '/data/nginx' || mkdir -p '/data/nginx'
test -d '/data/nginx/sbin' \|| mkdir -p '/data/nginx/sbin'
test ! -f '/data/nginx/sbin/nginx' \|| mv '/data/nginx/sbin/nginx' \'/data/nginx/sbin/nginx.old'
cp objs/nginx '/data/nginx/sbin/nginx'
test -d '/data/nginx/conf' \|| mkdir -p '/data/nginx/conf'
cp conf/koi-win '/data/nginx/conf'
cp conf/koi-utf '/data/nginx/conf'
cp conf/win-utf '/data/nginx/conf'
test -f '/data/nginx/conf/mime.types' \|| cp conf/mime.types '/data/nginx/conf'
cp conf/mime.types '/data/nginx/conf/mime.types.default'
test -f '/data/nginx/conf/fastcgi_params' \|| cp conf/fastcgi_params '/data/nginx/conf'
cp conf/fastcgi_params \'/data/nginx/conf/fastcgi_params.default'
test -f '/data/nginx/conf/fastcgi.conf' \|| cp conf/fastcgi.conf '/data/nginx/conf'
cp conf/fastcgi.conf '/data/nginx/conf/fastcgi.conf.default'
test -f '/data/nginx/conf/uwsgi_params' \|| cp conf/uwsgi_params '/data/nginx/conf'
cp conf/uwsgi_params \'/data/nginx/conf/uwsgi_params.default'
test -f '/data/nginx/conf/scgi_params' \|| cp conf/scgi_params '/data/nginx/conf'
cp conf/scgi_params \'/data/nginx/conf/scgi_params.default'
test -f '/data/nginx/conf/nginx.conf' \|| cp conf/nginx.conf '/data/nginx/conf/nginx.conf'
cp conf/nginx.conf '/data/nginx/conf/nginx.conf.default'
test -d '/data/nginx/logs' \|| mkdir -p '/data/nginx/logs'
test -d '/data/nginx/logs' \|| mkdir -p '/data/nginx/logs'
test -d '/data/nginx/html' \|| cp -R html '/data/nginx'
test -d '/data/nginx/logs' \|| mkdir -p '/data/nginx/logs'
make[1]: 离开目录“/usr/local/src/nginx-1.28.0”

        修改nginx的相关配置后,启动nginx

# ps -ef| grep nginx| grep -v grep
app         9144       1  0 16:02 ?        00:00:00 nginx: master process ../sbin/nginx
app         9145    9144  0 16:02 ?        00:00:00 nginx: worker process
app         9146    9144  0 16:02 ?        00:00:00 nginx: worker process# cat /etc/redhat-release 
AlmaLinux release 9.5 (Teal Serval)$ cd nginx/sbin/$ ./nginx -V
nginx version: nginx/1.28.0
built by gcc 11.5.0 20240719 (Red Hat 11.5.0-5) (GCC) 
built with OpenSSL 3.2.2 4 Jun 2024
TLS SNI support enabled
configure arguments: --prefix=/data/nginx --with-stream --with-stream_ssl_module --with-threads --with-http_ssl_module --with-http_stub_status_module --user=app --group=apps
$ ./nginx -V
nginx version: nginx/1.28.0
built by gcc 8.5.0 20210514 (Red Hat 8.5.0-26) (GCC) 
built with OpenSSL 1.1.1k  FIPS 25 Mar 2021
TLS SNI support enabled
configure arguments: --prefix=/data/nginx --with-stream --with-stream_ssl_module --with-threads --with-http_ssl_module --with-http_stub_status_module --user=app --group=apps$ cat /etc/redhat-release 
AlmaLinux release 8.10 (Cerulean Leopard)
http://www.xdnf.cn/news/1560.html

相关文章:

  • ASP.NET MVC​ 入门指南
  • 数据结构【树和二叉树】
  • 无过拟合的记忆:分析大语言模型的训练动态
  • 2025 年“泰迪杯”数据挖掘挑战赛B题——基于穿戴装备的身体活动监测问题分析
  • 高性能服务器配置经验指南3——安装服务器可能遇到的问题及解决方法
  • 编译型语言、解释型语言与混合型语言:原理、区别与应用场景详解
  • w~视觉~合集3
  • 【go语言】window环境从源码编译go
  • 强化学习核心原理及数学框架
  • 【C++ 类和数据抽象】static 类成员
  • Ubuntu 24.04 安装流水账
  • Pgvector+R2R搭建RAG知识库
  • 审计效率升级!快速匹配Excel报表项目对应的Word附注序号
  • 文字均分的css
  • 【多源01BFS】Codeforce:Three States
  • pnpm install报错:此系统上禁止运行脚本
  • 12N60-ASEMI无人机专用功率器件12N60
  • 【mdlib】0 全面介绍 mdlib - Rust 实现的 Markdown 工具集
  • CVE-2024-23897-Jenkins 2.441之前版本存在任意文件读取漏洞
  • Pikachu靶场-File Inclusion
  • 雪花算法生成int64,在前端js的精度问题
  • 【产品经理从0到1】原型及Axure介绍
  • Python协程详解:从基础到实战
  • Kafka消息可视化工具Offset Explorer
  • 云原生之认识DDD
  • 新型恶意软件采用独特混淆技术劫持Docker镜像
  • win11什么都不动之后一段时间黑屏桌面无法显示,但鼠标仍可移动,得要熄屏之后才能进入的四种解决方法
  • Kotlin基础知识全面解析(下)
  • java IO流
  • 【Linux内核】内核中的中断管理