安装nginx

yum install nginx -y

安装依赖

 yum -y install libxml2 libxml2-dev libxslt-devel gd-devel perl-devel perl-ExtUtils-Embe perl-devel perl-ExtUtils-Embed  gperftools   redhat-rpm-config.noarch

下载源码包

wget http://nginx.org/download/nginx-1.20.1.tar.gz && tar xf nginx-1.20.1.tar.gz -C /opt

查看nginx配置

# nginx -V
nginx version: nginx/1.20.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
built with OpenSSL 1.1.1g FIPS  21 Apr 2020
TLS SNI support enabled
configure arguments: --prefix=/usr/share/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 --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-compat --with-debug --with-file-aio --with-google_perftools_module --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --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-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'

编译源码

 ./configure --prefix=/usr/share/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 --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-compat --with-debug --with-file-aio --with-google_perftools_module --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --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-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E' --with-stream

覆盖配置

make install

检查语法

nginx -tnginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

stream不会报错

nginx添加stream模块1.20相关推荐

  1. nginx添加第三方模块,以及启用nginx本身支持的模块

    nginx添加第三方模块,以及启用nginx本身支持的模块 Nginx添加第三方模块 转载于:https://www.cnblogs.com/linjiqin/p/11512867.html

  2. Ubuntu20.04中fastdfs,nginx的安装和配置(apt-get安装nginx添加fastdfs-nginx-module模块)

    Ubuntu20.04中fastdfs,nginx的安装和配置 环境准备: 编译环境: Ubuntu20.04 使用的系统软件: fastdfs-6.07 fastdfs-nginx-module-1 ...

  3. 利用nginx的stream模块实现内网端口的转发代理

    nginx从1.9.0开始,新增加了一个stream模块,用来实现四层协议的转发.代理或者负载均衡等.比如在内网有一个mysql服务,想暴露到公网上去使用,就可以通过nginx代理的方式通过nginx ...

  4. Nginx添加SSL模块

    文章目录 一.SSL介绍 1.1SSL概述 1.2SSL证书 1.3HTTPS 1.4SSL工作原理 二.创建SSL证书 2.1程序安装 2.2生成证书 三.Nginx配置 3.1添加ssl模块 3. ...

  5. Nginx添加ngx_http_headers_module模块

    今天由于公司微信端添加地图业务,但地图不支持https,所以将https改为http访问,因此出现访问异常,原因是之前访问的用户,微信端存在缓存页面,但是不会清楚,所以我就提出,可以在nginx在主机 ...

  6. 为已经安装nginx添加php模块,安装成功的nginx如何添加未编译安装模块

    原已经安装好的nginx,现在需要添加一个未被编译安装的模块: nginx -V 可以查看原来编译时都带了哪些参数 原来的参数: --prefix=/app/nginx 添加的参数: --with-h ...

  7. Nginx使用stream模块分流实现端口复用

    使用Nginx复用端口有很多方法,最普遍的方法是在不同的server块中监听同一端口,根据不同的主机名完成分流.本文介绍了一种较新的端口复用方法,它可以方便地对TLS加密的TCP数据进行分流. 1 N ...

  8. linux+nginx添加rtmp,编译安装nginx添加rtmp模块

    8种机械键盘轴体对比 本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选? 摘要:nginx源码编译添加rtmp模块实现视频推流服务器 环境:deepin linux 15.10.1(基于debi ...

  9. 在已安装好的nginx 添加rtmp模块

    基本原理就是nginx已经是安好编译好的,添加模块需要在解压目录(不是安装目录)里的添加上这个模块(用./configure注册上所有要用的模块),再在解压目录里重新编译,把新编译好的编译文件去安装目 ...

最新文章

  1. linux下截屏工具
  2. Memcached 一致性哈希算法PHP实现
  3. Learning-Python【0】:Windows环境下Python2和Python3的安装
  4. JS 总结之关于 this 应该知道的几个点
  5. 你身边有没有白天上班,晚上打零工送外卖、跑滴滴、做代驾的朋友?你怎么看?
  6. 大场面试必问:秒杀90%Java面试者,后悔没有早点知道!
  7. Jaakko isalo谈《愤怒的小鸟》创意来源
  8. java运行时内存模型
  9. Android Multimedia框架总结(五)多媒体基础概念
  10. go语言mongdb管道使用
  11. 通达OA11.0 补丁文件
  12. 数控dda法直线插补程序c语言,DDA法直线插补
  13. 2007年度全世界最好的50个网站
  14. 常微分方程各种类型方程表格汇总
  15. Ajax获取服务器端响应数据的两种方式
  16. 京东再次偷袭在线旅游
  17. linux格式化提示分区被占用,无法格式化D盘提示被占用要怎么解决?D盘无法格式化被占用解决教程...
  18. 考研二战失败 我的从零开始Java入门学习(十)
  19. ESRI电力输配电及电力设施管理解决方案
  20. Vue3视频播放(Video)

热门文章

  1. ISME:病原菌介导植物根际有益微生物群落组装
  2. pandas使用query函数基于判断条件获得dataframe中满足条件的数据行(row)的索引列表(index of rows matching conditions in dataframe)
  3. R语言ggplot2可视化强制指定X轴的日期范围实战:组合条形图和lm模型构建的回归模型的结果并强制指定X轴的日期范围
  4. R语言vtreat包自动处理dataframe的缺失值并生成对应的数据列_isbad来指示数据的原始缺失情况、查看特定字段缺失的那些数据行、查看数据集中多个字段的均值
  5. R语言abs函数计算数值数据对象的绝对值实战
  6. python手动将机器学习模型保存为json文件
  7. 使用聚类算法(Kmeans)进行数据降维并作为分类算法逻辑回归(logistic Regression)的数据预处理步骤实战
  8. python绘制影像组学训练集、测试集对应的ROC曲线以及瀑布图(rad-score 瀑布图)
  9. ANTS医学影像配准+Li‘s 核磁共振影像数据处理
  10. 分类家族:二分类、多分类、多标签分类、多输出分类