从源代码构建 Nginx

使用configure命令配置该版本。它定义了系统的各个方面,包括允许 nginx 用于连接处理的方法。最后,它创建一个Makefile

configure命令支持以下参数:

--build=name

参数用法示例(所有这些都需要在一行中键入):

./configure
    --sbin-path=/usr/local/nginx/nginx
    --conf-path=/usr/local/nginx/nginx.conf
    --pid-path=/usr/local/nginx/nginx.pid
    --with-http_ssl_module
    --with-pcre=../pcre-8.44
    --with-zlib=../zlib-1.2.11

配置完成后,使用make编译并安装 nginx。

首页