Linux/Unix openssl 3 使用openssl 3.0 安装nginx nginx-quic【兼容宝塔面板】

        openssl3已经测试了一段时间了,在官网看到后就想用来安装nginx,以下是我的安装过程。

更新日志:

1. 2023-1-9 更新脚本以及依赖以在Centos7 + 宝塔面板上 成功安装

2. 2023-1-11 支持nginx-quic安装!!!

#####先附上正确方案

mkdir nginx&&cd nginx
curl -O https://hg.nginx.org/nginx-quic/archive/quic.tar.gz
tar -xzvf quic.tar.gz
curl -O https://nchc.dl.sourceforge.net/project/pcre/pcre/8.43/pcre-8.43.tar.bz2
tar -jxvf pcre-8.43.tar.bz2
curl -O http://zlib.net/zlib-1.2.11.tar.gz
tar -vzxf zlib-1.2.11.tar.gz
curl -O https://www.openssl.org/source/old/3.0/openssl-3.0.0-alpha17.tar.gz
tar -xzvf openssl-3.0.0-alpha17.tar.gz
cd openssl-3.0.0-alpha17
./Configure && make -j4
cd ..
cd nginx-quic-quic
./auto/configure  --prefix=自行修改  \
--user=自行修改  \
--group=自行修改  \
--with-debug  \
--with-http_ssl_module  \
--with-http_gzip_static_module  \
--with-http_flv_module  \
--with-http_mp4_module  \
--with-http_v2_module  \
--with-stream  \
--with-http_sub_module  \
--with-http_stub_status_module  \
--with-stream_ssl_module  \
--with-stream_ssl_preread_module  \
--with-openssl=../openssl-3.0.0-alpha17   \
--with-pcre=../pcre-8.43  \
--with-zlib=../zlib-1.2.11    \
--with-cc-opt="-Wno-error -Wno-deprecated-declarations"
make -j4 && make install

宝塔面板一键安装脚本:

curl -O https://gitee.com/qinyinan/share/raw/master/scripts/nginx.sh
bash nginx.sh install 1.23
rm nginx.sh

此处可选多个版本,1.20及以上均可~

目前支持 1.20, 1.23, quic !!!

附上截图!

P.S. Debian GNU/Hurd 安装截图!

P.S. 最新版宝塔面板安装截图

P.S. nginx-quic 安装图

 

 

####排错经历

        由于我用的是freeBSD作为服务器,网上资源不是很多,而且Openssl 3才出来没有多久。所以当我按照老版本openssl以及nginx的安装方法安装时,就出现了以下报错

-Werror,-Wdeprecated-declarations

编译器会提示API已经弃用了(估计是nginx没有更新代码),并且把所有警告视为了错误,才会报错停止。

####解决方法

        在C-flags里加上-Wno-error -Wno-deprecated-declarations即可。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

秦以南

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值