【转载请注明出处】:https://blog.csdn.net/huahao1989/article/details/106088422
安装依赖包
OpenSSL
PCRE
在 PCRE 官网可以找到下载地址,这里选择8.x的最高版本 pcre-8.42.tar.gz。
zlib
zlib 直接选择官网首页最新的zlib-1.2.11.tar.gz。
下载nginx 源码包及nginx-upsync-module模块源码
这里下载的是nginx稳定版nginx-1.14.2.tar.gz,nginx-upsync-module模块源码使用git clone https://github.com/weibocom/nginx-upsync-module.git
下载。
解压之后进入源码目录执行
./configure --sbin-path=/usr/local/opt/nginx --conf-path=/usr/local/etc/nginx/nginx.conf --pid-path=/usr/local/opt/nginx/nginx.pid --prefix=/usr/local/opt/nginx --with-http_ssl_module --add-module=/work/tools/nginx-modules/ngi