关于nginx:nginx-源码编译安装-https-stream模块

7次阅读

共计 696 个字符,预计需要花费 2 分钟才能阅读完成。

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

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

介质下载地址 提取码: z8tq

  1. 编译装置

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

tar -zxvf pcre-8.45.tar.gz  -C ./dep/

cd ./dep/pcre-8.45/

./configure

make

make 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.1
ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
# 从新建设关系后  查看 openssl 版本
openssl version
  1. 启动 nginx
./nginx

ps -ef | grep nginx

./configure 怎么用

nginx 动静增加 openssl 库

正文完
 0