下载nginx包,具体版本查看Nginx官方下载地址

wget http://nginx.org/download/nginx-1.17.10.tar.gz

一些编译安装要用到的依赖包

gcc  gcc-c++  make pcre-devel zlib-devel openssl-devel

openssl-devel(用于加密)

常用插件

--prefix=/usr/local/nginx \
--user=nginx \
--group=nginx \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_gzip_static_module

--prefix=/usr/local/nginx(指定安装路径)
--user=nginx --group=nginx(指定运行用户和组)
--with-http_stub_status_module(启用该模块以支持状态统计)
--with-http_ssl_module(启用SSL模块)
--with-http_flv_module(启用FLV模块,提供寻求内存使用基于时间的偏移量文件)
--with-http_gzip_static_module(预读gzip功能)

常用插件2 (内含stream模块反向代理)

--prefix=/usr/local/nginx \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gzip_static_module \
--with-stream \
--with-stream_realip_module \
--with-stream_ssl_module && make && make install

 

相关文章:

  • 2021-06-18
  • 2022-12-23
  • 2022-01-23
  • 2022-12-23
  • 2021-09-04
  • 2021-06-13
  • 2021-09-26
  • 2022-12-23
猜你喜欢
  • 2021-08-22
  • 2021-06-04
  • 2022-12-23
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案