nginx源码编译


下载nginx-module-vts:git clone git://github.com/vozlt/nginx-module-vts.git 并上传到机器上

下载openssl-1.0.2k:https://www.openssl.org/source/old/1.0.2/ 并上传到机器上

安装编译依赖:yum -y install pcre-devel  zlib-devel

编译命令:

./configure --prefix=/home/maintain/nginx --conf-path=/home/shared/nginx/conf/nginx.conf --pid-path=/home/shared/nginx/logs/nginx.pid --error-log-path=/home/shared/nginx/logs/error.log --with-http_ssl_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_realip_module --with-http_v2_module --with-stream --with-openssl=/home/maintain/openssl-1.0.2k/openssl-1.0.2k --add-module=/home/maintain/nginx-module-vts

make (如果是全新编译安装可以用make install)

编译出的nginx二进制文件在 objs目录下