源码装置nginx 并增加https和stream模块

  1. 筹备源码装置的介质
介质名称作用
nginxnginx的作用
PCRE让 Nginx 反对 Rewrite 性能
zlibsZlib是一个压缩和解压模块,应用这个模块能够做很多事件。
opensslopenssl作用

介质下载地址 提取码: z8tq

  1. 编译装置

将介质下载 并上传到服务器

tar -zxvf pcre-8.45.tar.gz  -C ./dep/cd ./dep/pcre-8.45/./configuremakemake install...以此类推 编译装置 zlibs和openssl最初装置nginx时 编译的门路须要指定./configure --with-http_ssl_module --with-stream --prefix='指定nginx装置的门路'而后make && make install

启动nginx如果报错:

openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

执行命令

ln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/libssl.so.1.1ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1# 从新建设关系后  查看openssl版本openssl version
  1. 启动nginx
./nginxps -ef | grep nginx

./configure 怎么用

nginx 动静增加openssl库