nginx安装nginx-quic

简介: nginx安装nginx-quic

nginx quic构建与添加

1、安装nginx编译环境

1
dnf install gcc gcc-c++ pcre-devel openssl-devel zlib-devel cmake make go libunwind-devel hg git wget

2、克隆依赖库

1
git clone https://gitee/fenghuolingyun/boringssl.git

3、克隆quic分支源码

1
hg clone -b quic https://hg.nginx.org/nginx-quic

4、开始编译ssl依赖

  • 配置发布稳定版本 默认使用cmake .. 构建调试版本如果构建中报错添加全局go代理export GO111MODULE=on export GOPROXY=https://mirrors.aliyun.com/goproxy/
1
2
3
4
5
cd boringssl
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release .. 
make

5、编译nginx程序

  • 目录访问美化插件模块可以不添加--add-module=../ngx-fancyindex-0.5.2不要进行make install
1
2
3
cd nginx-quic
./auto/configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --add-module=../ngx-fancyindex-0.5.2 --with-http_v3_module --with-cc-opt=-I../boringssl/include --with-ld-opt='-L../boringssl/build/ssl -L../boringssl/build/crypto'
make

6、编译完成我们替换掉yum源安装的主程序

1
cd objs && rm -rf /usr/sbin/nginx && cp ./nginx /usr/sbin/nginx

7、全部完成开启服务并且启动

  • 创建开机启动systemctl enable nginx
  • 重启服务systemctl restart nginx
  • 移除开机启动systemctl disable nginx
  • 配置文件在/etc/nginx/


目录
相关文章
|
1月前
|
应用服务中间件 nginx
Nginx安装nginx-rtmp-module模块
【2月更文挑战第4天】 nginx中的模块虽然就是类似插件的概念,但是它无法像VsCode那样轻松的安装扩展。 nginx要安装其它模块必须同时拿到nginx源代码和模块源代码,然后手动编译,将模块打到nginx中,最终生成一个名为nginx的可执行文件。
74 6
|
2月前
|
负载均衡 Ubuntu 应用服务中间件
|
3月前
|
Unix 应用服务中间件 Linux
1-Nginx介绍及安装(源码安装)
1-Nginx介绍及安装(源码安装)
44 4
|
2月前
|
缓存 负载均衡 应用服务中间件
如何在 CentOS 7 上为 NGINX 安装开源 HTTP 加速器:Varnish
如何在 CentOS 7 上为 NGINX 安装开源 HTTP 加速器:Varnish
71 1
如何在 CentOS 7 上为 NGINX 安装开源 HTTP 加速器:Varnish
|
7天前
|
应用服务中间件 nginx
yum 安装报错 No package nginx available Error:Nothing to do
yum 安装报错 No package nginx available Error:Nothing to do
20 1
|
27天前
|
应用服务中间件 Linux PHP
Linux下安装php环境并且配置Nginx支持php-fpm模块
Linux下安装php环境并且配置Nginx支持php-fpm模块
29 0
|
28天前
|
前端开发 应用服务中间件 网络安全
http转为https,ssl证书安装及nginx配置
http转为https,ssl证书安装及nginx配置
44 1
|
29天前
|
网络协议 应用服务中间件 网络安全
linxu安装nginx
linxu安装nginx
66 0
|
1月前
|
NoSQL 关系型数据库 MySQL
Docker安装详细步骤及相关环境安装配置(mysql、jdk、redis、自己的私有仓库Gitlab 、C和C++环境以及Nginx服务代理)
Docker安装详细步骤及相关环境安装配置(mysql、jdk、redis、自己的私有仓库Gitlab 、C和C++环境以及Nginx服务代理)
216 0
|
1月前
|
负载均衡 应用服务中间件 nginx