Centos6.*安装新版Nginx1.19.5支持众多新功能

本文主要关于新版Nginx.1.19.5下,实用的新模块安装使用

由于新版功能较多,因此本文把常用到的模块一起编译打包

  打包的功能包括:https支持,flv,mp4,tcp代理支持

1.下载解压

  下载  wget https://nginx.org/download/nginx-1.19.5.tar.gz

  tar -xzvf nginx-1.19.5.tar.gz

2.编译安装

  准备

    cd nginx-1.19.5

  配置

    ./configure --with-http_stub_status_module --with-http_stub_status_module --with-http_ssl_module --with-stream --with-stream_ssl_preread_module --with-stream_ssl_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module

    编译

    make

  安装

    make install

注意事项:

  在新版stream模块里面,同一个nginx.conf文件只允许有一个stream指令;出现多个stream则语法编译不通过。