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/


目录
相关文章
|
10天前
|
负载均衡 Java 应用服务中间件
nginx安装在linux上
nginx安装在linux上
35 2
|
15天前
|
应用服务中间件 nginx
树莓派安装Nginx服务结合内网穿透实现无公网IP远程访问
树莓派安装Nginx服务结合内网穿透实现无公网IP远程访问
|
26天前
|
缓存 负载均衡 应用服务中间件
Nginx安装与使用: Nginx之编译安装的nginx加入systemctl、Nginx命令
Nginx安装与使用: Nginx之编译安装的nginx加入systemctl、Nginx命令
52 0
|
4天前
|
弹性计算 应用服务中间件 Shell
一键编译安装Nginx脚本
【4月更文挑战第30天】
8 1
|
5天前
|
关系型数据库 MySQL 应用服务中间件
centos7在线安装jdk1.8+tomcat+mysql8+nginx+docker
现在,你已经成功在CentOS 7上安装了JDK 1.8、Tomcat、MySQL 8、Nginx和Docker。你可以根据需要配置和使用这些服务。请注意,安装和配置这些服务的详细设置取决于你的具体需求。
21 2
|
8天前
|
应用服务中间件 Linux nginx
Linux下的nginx安装
Linux下的nginx安装
33 0
|
9天前
|
负载均衡 前端开发 应用服务中间件
Nginx安装与使用
Nginx安装与使用
27 0
|
11天前
|
应用服务中间件 Linux 网络安全
【Linux】中如何安装nginx
【Linux】中如何安装nginx
27 0
|
15天前
|
应用服务中间件 Linux nginx
Nginx的安装(Linux版)
Nginx的安装(Linux版)
20 0
Nginx的安装(Linux版)
|
16天前
|
应用服务中间件 nginx
yum 安装报错 No package nginx available Error:Nothing to do
yum 安装报错 No package nginx available Error:Nothing to do
38 1