Nginx configure 详解-元一软件
本文将介绍Nginx在进行源码编译安装过程中我们怎样使用 configure 去配置我们自己的Nginx。本文是根据Nginx官网 https://nginx.org/en/docs/configure.html 配置教程使用词典翻译过来英语水平有限只能简单翻译有错勿喷。使用 configure 命令配置构建。它定义了系统的各个方面包括 Nginx 允许用于连接处理的方法。最后它创建一个 Makefile。Nginx 可以通过 configure 选项来启用–without-或禁用–with-模块分别如下–with- 启用模块该类前缀的模块表示默认并不会编译到nginx中如果我们要将某个模块编译到nginx需要添加 --with- 即可。例如–with-http_ssl_module 默认nginx是不会编译 http-ssl 模块到 nginx中如果要添加该模块命令如下[rootS0 nginx-1.16.1]# ./configure --with-http_ssl_module–without- 禁用模块该类前缀模块默认是会编译到我们的Nginx如果我们不想要某个模块只需要添加 --without- 即可。例如–without-http_gzip_module 默认 nginx 是将 gzip 模块编译到 nginx 中的如果要去除该模块命令如下[rootS0 nginx-1.16.1]# ./configure --without-http_gzip_module这样就将 gzip 模块排除了。Example of parameters usage (all of this needs to be typed in one line):参数使用示例所有这些都需要在一行中输入./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.43 --with-zlib../zlib-1.2.11After configuration, nginx is compiled and installed using make.配置完成后使用 make 编译并安装 nginx。configure 命令支持以下参数–helpprints a help message.打印帮助信息。–prefixpathdefines a directory that will keep server files. This same directory will also be used for all relative paths set by configure (except for paths to libraries sources) and in the nginx.conf configuration file. It is set to the /usr/local/nginx directory by default.定义保存服务器文件的目录。这个目录还将用于 configure除了指向库源的路径和 nginx.conf 配置文件中设置的所有相对路径。–sbin-pathpathsets the name of an nginx executable file. This name is used only during installation. By default the file is named prefix/sbin/nginx.设置 nginx 可执行文件的名称。此名称仅在安装期间使用。默认情况下文件名为 prefix/sbin/nginx。–modules-pathpathdefines a directory where nginx dynamic modules will be installed. By default the prefix/modules directory is used.定义将安装nginx动态模块的目录。默认情况下使用 prefix/modules 目录。–conf-pathpathsets the name of an nginx.conf configuration file. If needs be, nginx can always be started with a different configuration file, by specifying it in the command-line parameter -c file. By default the file is named prefix/conf/nginx.conf.设置 nginx.conf 配置文件的名称。如果需要nginx总是可以通过在命令行参数 -c 指定一个不同的配置文件来启动。默认情况下文件名为 prefix/conf/nginx.conf。–error-log-pathpathsets the name of the primary error, warnings, and diagnostic file. After installation, the file name can always be changed in the nginx.conf configuration file using the error_log directive. By default the file is named prefix/logs/error.log.设置主要错误、警告和诊断文件的名称。安装之后可以使用 error_log 指令在 nginx.conf 配置文件中更改文件名。默认情况下文件名为 prefix/logs/error.log。–pid-pathpathsets the name of an nginx.pid file that will store the process ID of the main process. After installation, the file name can always be changed in the nginx.conf configuration file using the piddirective. By default the file is named prefix/logs/nginx.pid.设置 nginx.pid 文件的名称。pid文件它将存储主进程的进程ID。安装之后总是可以使用 piddirective 在 nginx.conf 配置文件中更改文件名。默认情况下文件名为 prefix/logs/nginx.pid。–lock-pathpathsets a prefix for the names of lock files. After installation, the value can always be changed in thenginx.conf configuration file using the lock_file directive. By default the value is prefix/logs/nginx.lock.为锁定文件的名称设置前缀。安装之后可以使用 lock_file 指令在 thenginx.conf 配置文件中更改该值。默认值是 prefix/logs/nginx.lock。–usernamesets the name of an unprivileged user whose credentials will be used by worker processes. After installation, the name can always be changed in the nginx.conf configuration file using the userdirective. The default user name is nobody.设置工作进程将使用其凭据的无特权用户的名称。安装之后可以使用 userdirective 在 nginx.conf 配置文件中更改名称。默认的用户名是 nobody。–groupnamesets the name of a group whose credentials will be used by worker processes. After installation, the name can always be changed in the nginx.conf configuration file using the user directive. By default, a group name is set to the name of an unprivileged user.设置工作进程将使用其凭据的组的名称。安装之后可以使用 user 指令在 nginx.conf 配置文件中更改名称。默认情况下组名设置为无特权用户的名称。–buildnamesets an optional nginx build name.设置一个可选的nginx构建名。–builddirpathsets a build directory.设置生成目录。–with-select_module–without-select_moduleenables or disables building a module that allows the server to work with the select() method. This module is built automatically if the platform does not appear to support more appropriate methods such as kqueue, epoll, or /dev/poll.–with-poll_module–without-poll_moduleenables or disables building a module that allows the server to work with the poll() method. This module is built automatically if the platform does not appear to support more appropriate methods such as kqueue, epoll, or /dev/poll.启用或禁用构建允许服务器使用poll()方法的模块。如果平台不支持更合适的方法如kqueue、epoll或/dev/poll则自动构建此模块。–with-threadsenables the use of thread pools.启用线程池的使用。–with-file-aioenables the use of asynchronous file I/O (AIO) on FreeBSD and Linux.支持在FreeBSD和Linux上使用异步文件I/O (AIO)。–with-http_ssl_moduleenables building a module that adds the HTTPS protocol support to an HTTP server. This module is not built by default. The OpenSSL library is required to build and run this module.启用构建模块将HTTPS协议支持添加到HTTP服务器。默认情况下不构建此模块。构建和运行此模块需要OpenSSL库。–with-http_v2_moduleenables building a module that provides support for HTTP/2. This module is not built by default.支持构建支持HTTP/2的模块。默认情况下不构建此模块。–with-http_realip_moduleenables building the ngx_http_realip_module module that changes the client address to the address sent in the specified header field. This module is not built by default.启用生成ngx_http_realip_module模块该模块将客户端地址更改为在指定头字段中发送的地址。默认情况下不构建此模块。–with-http_addition_moduleenables building the ngx_http_addition_module module that adds text before and after a response. This module is not built by default.支持构建ngx_http_addition_module模块该模块在响应前后添加文本。默认情况下不构建此模块。–with-http_xslt_module–with-http_xslt_moduledynamicenables building the ngx_http_xslt_module module that transforms XML responses using one or more XSLT stylesheets. This module is not built by default. The libxml2 and libxslt libraries are required to build and run this module.启用构建ngx_http_xslt_module模块该模块使用一个或多个XSLT样式表转换XML响应。默认情况下不构建此模块。构建和运行此模块需要libxml2和libxslt库。–with-http_image_filter_module–with-http_image_filter_moduledynamicenables building the ngx_http_image_filter_module module that transforms images in JPEG, GIF, PNG, and WebP formats. This module is not built by default.支持构建ngx_http_image_filter_module模块该模块转换JPEG、GIF、PNG和WebP格式的图像。默认情况下不构建此模块。–with-http_geoip_module–with-http_geoip_moduledynamicenables building the ngx_http_geoip_module module that creates variables depending on the client IP address and the precompiled MaxMind databases. This module is not built by default.支持构建ngx_http_geoip_module模块该模块根据客户端IP地址和预编译的MaxMind数据库创建变量。默认情况下不构建此模块。–with-http_sub_moduleenables building the ngx_http_sub_module module that modifies a response by replacing one specified string by another. This module is not built by default.启用构建ngx_http_sub_module模块该模块通过替换一个指定的字符串来修改响应。默认情况下不构建此模块。–with-http_dav_moduleenables building the ngx_http_dav_module module that provides file management automation via the WebDAV protocol. This module is not built by default.支持构建ngx_http_dav_module模块该模块通过WebDAV协议提供文件管理自动化。默认情况下不构建此模块。–with-http_flv_moduleenables building the ngx_http_flv_module module that provides pseudo-streaming server-side support for Flash Video (FLV) files. This module is not built by default.支持构建ngx_http_flv_module模块该模块为Flash视频(FLV)文件提供伪流服务器端支持。默认情况下不构建此模块。–with-http_mp4_moduleenables building the ngx_http_mp4_module module that provides pseudo-streaming server-side support for MP4 files. This module is not built by default.支持构建ngx_http_mp4_module模块该模块为MP4文件提供伪流服务器端支持。默认情况下不构建此模块。–with-http_gunzip_moduleenables building the ngx_http_gunzip_module module that decompresses responses with “Content-Encoding: gzip” for clients that do not support “gzip” encoding method. This module is not built by default.支持为不支持“gzip”编码方法的客户机构建ngx_http_gunzip_module模块该模块使用“Content-Encoding: gzip”解压响应。默认情况下不构建此模块。–with-http_gzip_static_moduleenables building the ngx_http_gzip_static_module module that enables sending precompressed files with the “.gz” filename extension instead of regular files. This module is not built by default.支持构建ngx_http_gzip_static_module模块该模块支持使用“.gz”发送预压缩文件。文件名扩展名而不是普通文件。默认情况下不构建此模块。–with-http_auth_request_moduleenables building the ngx_http_auth_request_module module that implements client authorization based on the result of a subrequest. This module is not built by default.支持构建ngx_http_auth_request_module模块该模块基于子请求的结果实现客户端授权。默认情况下不构建此模块。–with-http_random_index_moduleenables building the ngx_http_random_index_module module that processes requests ending with the slash character (‘/’) and picks a random file in a directory to serve as an index file. This module is not built by default.支持构建ngx_http_random_index_module模块该模块处理以斜杠字符(’ / )结尾的请求并在目录中选择一个随机文件作为索引文件。默认情况下不构建此模块。–with-http_secure_link_moduleenables building the ngx_http_secure_link_module module. This module is not built by default.启用生成ngx_http_secure_link_module模块。默认情况下不构建此模块。–with-http_degradation_moduleenables building the ngx_http_degradation_module module. This module is not built by default.支持构建ngx_http_degradation_module模块。默认情况下不构建此模块。–with-http_slice_moduleenables building the ngx_http_slice_module module that splits a request into subrequests, each returning a certain range of response. The module provides more effective caching of big responses. This module is not built by default.支持构建ngx_http_slice_module模块该模块将请求拆分为子请求每个子请求返回一定范围的响应。该模块提供了更有效的大响应缓存。默认情况下不构建此模块。–with-http_stub_status_moduleenables building the ngx_http_stub_status_module module that provides access to basic status information. This module is not built by default.支持构建ngx_http_stub_status_module模块该模块提供对基本状态信息的访问。默认情况下不构建此模块。–without-http_charset_moduledisables building the ngx_http_charset_module module that adds the specified charset to the “Content-Type” response header field and can additionally convert data from one charset to another.禁用生成ngx_http_charset_module模块该模块将指定的charset添加到“Content-Type”响应头字段中并可以将数据从一个charset转换为另一个charset。–without-http_gzip_moduledisables building a module that compresses responses of an HTTP server. The zlib library is required to build and run this module.禁用构建压缩HTTP服务器响应的模块。构建和运行此模块需要zlib库。–without-http_ssi_moduledisables building the ngx_http_ssi_module module that processes SSI (Server Side Includes) commands in responses passing through it.禁用生成ngx_http_ssi_module模块该模块处理通过它的响应中的SSI(服务器端包含)命令。–without-http_userid_moduledisables building the ngx_http_userid_module module that sets cookies suitable for client identification.禁用生成ngx_http_userid_module模块该模块设置适合于客户端标识的cookie。–without-http_access_moduledisables building the ngx_http_access_module module that allows limiting access to certain client addresses.禁用生成ngx_http_access_module模块该模块允许限制对某些客户端地址的访问。–without-http_auth_basic_moduledisables building the ngx_http_auth_basic_module module that allows limiting access to resources by validating the user name and password using the “HTTP Basic Authentication” protocol.禁用构建ngx_http_auth_basic_module模块该模块允许使用“HTTP基本身份验证”协议验证用户名和密码从而限制对资源的访问。–without-http_mirror_moduledisables building the ngx_http_mirror_module module that implements mirroring of an original request by creating background mirror subrequests.禁用构建ngx_http_mirror_module模块该模块通过创建后台镜像子请求来实现对原始请求的镜像。–without-http_autoindex_moduledisables building the ngx_http_autoindex_module module that processes requests ending with the slash character (‘/’) and produces a directory listing in case the ngx_http_index_module module cannot find an index file.禁用生成ngx_http_autoindex_module模块该模块处理以斜杠字符(’ / )结尾的请求并在ngx_http_index_module模块无法找到索引文件时生成目录清单。–without-http_geo_moduledisables building the ngx_http_geo_module module that creates variables with values depending on the client IP address.禁用构建ngx_http_geo_module模块该模块根据客户端IP地址创建具有值的变量。–without-http_map_moduledisables building the ngx_http_map_module module that creates variables with values depending on values of other variables.禁用构建ngx_http_map_module模块该模块根据其他变量的值创建具有值的变量。–without-http_split_clients_moduledisables building the ngx_http_split_clients_module module that creates variables for A/B testing.禁用构建ngx_http_split_clients_module模块该模块为A/B测试创建变量。–without-http_referer_moduledisables building the ngx_http_referer_module module that can block access to a site for requests with invalid values in the “Referer” header field.禁用生成ngx_http_referer_module模块该模块可以阻止对“Referer”头字段中值无效的请求访问站点。–without-http_rewrite_moduledisables building a module that allows an HTTP server to redirect requests and change URI of requests. The PCRE library is required to build and run this module.禁用构建允许HTTP服务器重定向请求和更改请求URI的模块。构建和运行此模块需要PCRE库。–without-http_proxy_moduledisables building an HTTP server proxying module.禁用构建HTTP服务器代理模块。–without-http_fastcgi_moduledisables building the ngx_http_fastcgi_module module that passes requests to a FastCGI server.禁用生成ngx_http_fastcgi_module模块该模块将请求传递给FastCGI服务器。–without-http_uwsgi_moduledisables building the ngx_http_uwsgi_module module that passes requests to a uwsgi server.禁用生成ngx_http_uwsgi_module模块该模块将请求传递给uwsgi服务器。–without-http_scgi_moduledisables building the ngx_http_scgi_module module that passes requests to an SCGI server.禁用生成ngx_http_scgi_module模块该模块将请求传递给SCGI服务器。–without-http_grpc_moduledisables building the ngx_http_grpc_module module that passes requests to a gRPC server.禁用生成ngx_http_grpc_module模块该模块将请求传递给gRPC服务器。–without-http_memcached_moduledisables building the ngx_http_memcached_module module that obtains responses from a memcached server.禁用生成从memcached服务器获取响应的ngx_http_memcached_module模块。–without-http_limit_conn_moduledisables building the ngx_http_limit_conn_module module that limits the number of connections per key, for example, the number of connections from a single IP address.禁用生成ngx_http_limit_conn_module模块该模块限制每个键的连接数例如来自单个IP地址的连接数。–without-http_limit_req_moduledisables building the ngx_http_limit_req_module module that limits the request processing rate per key, for example, the processing rate of requests coming from a single IP address.禁用构建ngx_http_limit_req_module模块该模块限制每个键的请求处理速度例如来自单个IP地址的请求的处理速度。–without-http_empty_gif_moduledisables building a module that emits single-pixel transparent GIF.禁用生成发出单像素透明GIF的模块。–without-http_browser_moduledisables building the ngx_http_browser_module module that creates variables whose values depend on the value of the “User-Agent” request header field.禁用构建ngx_http_browser_module模块该模块创建的变量的值依赖于“User-Agent”请求头字段的值。–without-http_upstream_hash_moduledisables building a module that implements the hash load balancing method.禁用构建实现散列负载平衡方法的模块。–without-http_upstream_ip_hash_moduledisables building a module that implements the ip_hash load balancing method.禁用实现ip_hash负载平衡方法的模块。–without-http_upstream_least_conn_moduledisables building a module that implements the least_conn load balancing method.禁用构建实现least_conn负载平衡方法的模块。–without-http_upstream_keepalive_moduledisables building a module that provides caching of connections to upstream servers.禁用构建模块该模块提供到上游服务器的连接缓存。–without-http_upstream_zone_moduledisables building a module that makes it possible to store run-time state of an upstream group in a shared memory zone.禁用构建模块该模块使在共享内存区域中存储上游组的运行时状态成为可能。–with-http_perl_module–with-http_perl_moduledynamicenables building the embedded Perl module. This module is not built by default.支持构建嵌入式Perl模块。默认情况下不构建此模块。–with-perl_modules_pathpathdefines a directory that will keep Perl modules.定义一个保存Perl模块的目录。–with-perlpathsets the name of the Perl binary.设置Perl二进制文件的名称。–http-log-pathpathsets the name of the primary request log file of the HTTP server. After installation, the file name can always be changed in the nginx.conf configuration file using the access_log directive. By default the file is named prefix/logs/access.log.设置HTTP服务器的主请求日志文件的名称。安装之后总是可以使用access_log指令在nginx.conf配置文件中更改文件名。默认情况下文件名为prefix/logs/access.log。–http-client-body-temp-pathpathdefines a directory for storing temporary files that hold client request bodies. After installation, the directory can always be changed in the nginx.conf configuration file using theclient_body_temp_path directive. By default the directory is named prefix/client_body_temp.定义一个目录用于存储保存客户端请求主体的临时文件。安装之后可以使用theclient_body_temp_path指令在nginx.conf配置文件中更改目录。默认情况下目录名为prefix/client_body_temp。–http-proxy-temp-pathpathdefines a directory for storing temporary files with data received from proxied servers. After installation, the directory can always be changed in the nginx.conf configuration file using theproxy_temp_path directive. By default the directory is named prefix/proxy_temp.定义一个目录用于存储从代理服务器接收到的数据的临时文件。安装之后可以使用proxy_temp_path指令在nginx.conf配置文件中更改目录。默认情况下目录名为prefix/proxy_temp。–http-fastcgi-temp-pathpathdefines a directory for storing temporary files with data received from FastCGI servers. After installation, the directory can always be changed in the nginx.conf configuration file using thefastcgi_temp_path directive. By default the directory is named prefix/fastcgi_temp.定义一个目录用于存储从FastCGI服务器接收到的数据的临时文件。安装之后可以使用fastcgi_temp_path指令在nginx.conf配置文件中更改目录。默认情况下目录名为prefix/fastcgi_temp。–http-uwsgi-temp-pathpathdefines a directory for storing temporary files with data received from uwsgi servers. After installation, the directory can always be changed in the nginx.conf configuration file using theuwsgi_temp_path directive. By default the directory is named prefix/uwsgi_temp.定义一个目录用于存储从uwsgi服务器接收到的数据的临时文件。安装之后可以使用uwsgi_temp_path指令在nginx.conf配置文件中更改目录。默认情况下目录名为prefix/uwsgi_temp。–http-scgi-temp-pathpathdefines a directory for storing temporary files with data received from SCGI servers. After installation, the directory can always be changed in the nginx.conf configuration file using thescgi_temp_path directive. By default the directory is named prefix/scgi_temp.定义一个目录用于存储从SCGI服务器接收到的数据的临时文件。安装之后目录总是可以在nginx.conf配置文件中使用thescgi_temp_path指令进行更改。默认情况下目录名为prefix/scgi_temp。–without-httpdisables the HTTP server.禁用HTTP服务。–without-http-cachedisables HTTP cache.禁用HTTP缓存。–with-mail–with-maildynamicenables POP3/IMAP4/SMTP mail proxy server.启用POP3/IMAP4/SMTP邮件代理服务器。–with-mail_ssl_moduleenables building a module that adds the SSL/TLS protocol support to the mail proxy server. This module is not built by default. The OpenSSL library is required to build and run this module.启用构建模块将SSL/TLS协议支持添加到邮件代理服务器。默认情况下不构建此模块。构建和运行此模块需要OpenSSL库。–without-mail_pop3_moduledisables the POP3 protocol in mail proxy server.禁用邮件代理服务器中的POP3协议。–without-mail_imap_moduledisables the IMAP protocol in mail proxy server.禁用邮件代理服务器中的IMAP协议。–without-mail_smtp_moduledisables the SMTP protocol in mail proxy server.禁用邮件代理服务器中的SMTP协议。–with-stream–with-streamdynamicenables building the stream module for generic TCP/UDP proxying and load balancing. This module is not built by default.启用为通用TCP/UDP代理和负载平衡构建流模块。默认情况下不构建此模块。–with-stream_ssl_moduleenables building a module that adds the SSL/TLS protocol support to the stream module. This module is not built by default. The OpenSSL library is required to build and run this module.允许构建一个模块将SSL/TLS协议支持添加到流模块。默认情况下不构建此模块。构建和运行此模块需要OpenSSL库。–with-stream_realip_moduleenables building the ngx_stream_realip_module module that changes the client address to the address sent in the PROXY protocol header. This module is not built by default.支持构建ngx_stream_realip_module模块该模块将客户端地址更改为在代理协议头中发送的地址。默认情况下不构建此模块。–with-stream_geoip_module–with-stream_geoip_moduledynamicenables building the ngx_stream_geoip_module module that creates variables depending on the client IP address and the precompiled MaxMind databases. This module is not built by default.支持构建ngx_stream_geoip_module模块该模块根据客户端IP地址和预编译的MaxMind数据库创建变量。默认情况下不构建此模块。–with-stream_ssl_preread_moduleenables building the ngx_stream_ssl_preread_module module that allows extracting information from the ClientHello message without terminating SSL/TLS. This module is not built by default.支持构建ngx_stream_ssl_preread_module模块该模块允许在不终止SSL/TLS的情况下从ClientHello消息中提取信息。默认情况下不构建此模块。–without-stream_limit_conn_moduledisables building the ngx_stream_limit_conn_module module that limits the number of connections per key, for example, the number of connections from a single IP address.禁用构建ngx_stream_limit_conn_module模块该模块限制每个键的连接数例如来自单个IP地址的连接数。–without-stream_access_moduledisables building the ngx_stream_access_module module that allows limiting access to certain client addresses.禁用生成ngx_stream_access_module模块该模块允许限制对某些客户端地址的访问。–without-stream_geo_moduledisables building the ngx_stream_geo_module module that creates variables with values depending on the client IP address.禁用构建ngx_stream_geo_module模块该模块根据客户端IP地址创建具有值的变量。–without-stream_map_moduledisables building the ngx_stream_map_module module that creates variables with values depending on values of other variables.禁用构建ngx_stream_map_module模块该模块创建的变量的值依赖于其他变量的值。–without-stream_split_clients_moduledisables building the ngx_stream_split_clients_module module that creates variables for A/B testing.禁用构建ngx_stream_split_clients_module模块该模块为A/B测试创建变量。–without-stream_return_moduledisables building the ngx_stream_return_module module that sends some specified value to the client and then closes the connection.禁用生成ngx_stream_return_module模块该模块向客户机发送一些指定值然后关闭连接。–without-stream_upstream_hash_moduledisables building a module that implements the hash load balancing method.禁用构建实现散列负载平衡方法的模块。–without-stream_upstream_least_conn_moduledisables building a module that implements the least_conn load balancing method.禁用构建实现least_conn负载平衡方法的模块。–without-stream_upstream_zone_moduledisables building a module that makes it possible to store run-time state of an upstream group in a shared memory zone.禁用构建模块该模块使在共享内存区域中存储上游组的运行时状态成为可能。–with-google_perftools_moduleenables building the ngx_google_perftools_module module that enables profiling of nginx worker processes using Google Performance Tools. The module is intended for nginx developers and is not built by default.支持构建ngx_google_perftools_module模块该模块支持使用谷歌性能工具分析nginx工作进程。该模块是为nginx开发人员设计的默认情况下不构建。–with-cpp_test_moduleenables building the ngx_cpp_test_module module.启用生成ngx_cpp_test_module模块。–add-modulepathenables an external module.启用外部模块。–add-dynamic-modulepathenables an external dynamic module.启用外部动态模块。–with-compatenables dynamic modules compatibility.启用动态模块兼容性。–with-ccpathsets the name of the C compiler.设置C编译器的名称。–with-cpppathsets the name of the C preprocessor.设置C预处理器的名称。–with-cc-optparameterssets additional parameters that will be added to the CFLAGS variable. When using the system PCRE library under FreeBSD, --with-cc-opt“-I /usr/local/include” should be specified. If the number of files supported by select() needs to be increased it can also be specified here such as this: --with-cc-opt“-D FD_SETSIZE2048”.设置将添加到CFLAGS变量的其他参数。当使用FreeBSD下的系统PCRE库时应该指定——with-cc-opt“-I /usr/local/include”。如果select()支持的文件数量需要增加也可以在这里指定比如:-with-cc-opt“-D FD_SETSIZE2048”。–with-ld-optparameterssets additional parameters that will be used during linking. When using the system PCRE library under FreeBSD, --with-ld-opt“-L /usr/local/lib” should be specified.设置将在链接期间使用的其他参数。在使用FreeBSD下的系统PCRE库时应该指定——with-ld-opt“-L /usr/local/lib”。–with-cpu-optcpuenables building per specified CPU: pentium, pentiumpro, pentium3, pentium4, athlon, opteron, sparc32, sparc64,ppc64.支持为每个指定CPU构建:pentium、pentiumpro、pentium3、pentium4、athlon、opteron、sparc32、sparc64、ppc64。–without-pcredisables the usage of the PCRE library.禁用PCRE库的使用。–with-pcreforces the usage of the PCRE library.强制使用PCRE库。–with-pcrepathsets the path to the sources of the PCRE library. The library distribution (version 4.4 — 8.43) needs to be downloaded from the PCRE site and extracted. The rest is done by nginx’s ./configure andmake. The library is required for regular expressions support in the location directive and for thengx_http_rewrite_module module.设置到PCRE库源的路径。库分发版(版本4.4 - 8.43)需要从PCRE站点下载并提取。剩下的工作由nginx ./configure andmake完成。location指令和thengx_http_rewrite_module模块中的正则表达式支持都需要这个库。–with-pcre-optparameterssets additional build options for PCRE.为PCRE设置附加的构建选项。–with-pcre-jitbuilds the PCRE library with “just-in-time compilation” support (1.1.12, the pcre_jit directive).使用“即时编译”支持构建PCRE库(1.1.12,pcre_jit指令)。–with-zlibpathsets the path to the sources of the zlib library. The library distribution (version 1.1.3 — 1.2.11) needs to be downloaded from the zlib site and extracted. The rest is done by nginx’s ./configureand make. The library is required for the ngx_http_gzip_module module.设置指向zlib库源的路径。库发行版(版本1.1.3 - 1.2.11)需要从zlib站点下载并提取。其余部分由nginx s ./configureand make完成。ngx_http_gzip_module模块需要这个库。–with-zlib-optparameterssets additional build options for zlib.为zlib设置其他构建选项。–with-zlib-asmcpuenables the use of the zlib assembler sources optimized for one of the specified CPUs: pentium, pentiumpro.启用为指定cpu之一(pentium, pentiumpro)优化的zlib汇编程序源代码。–with-libatomicforces the libatomic_ops library usage.强制使用libatomic_ops库。–with-libatomicpathsets the path to the libatomic_ops library sources.设置到libatomic_ops库源的路径。–with-opensslpathsets the path to the OpenSSL library sources.设置到OpenSSL库源代码的路径。–with-openssl-optparameterssets additional build options for OpenSSL.为OpenSSL设置附加的构建选项。–with-debugenables the debugging log.启用调试日志。

相关新闻

Android安卓TCP Socket通信实战:从基础搭建到协议处理与性能调优(附源码)

Android安卓TCP Socket通信实战:从基础搭建到协议处理与性能调优(附源码)

1. Android TCP Socket通信基础搭建TCP Socket通信是Android开发中实现网络通信的基础技术,尤其适合需要稳定数据传输的场景,比如物联网设备控制、即时通讯等。很多刚接触Socket的开发者容易陷入一个误区:认为Socket通信就是简单的"连接…

2026/7/16 9:47:20阅读更多 →
oeDevPlugin 与 EulerMaker 集成教程:一键编译 openEuler 项目的终极方案

oeDevPlugin 与 EulerMaker 集成教程:一键编译 openEuler 项目的终极方案

oeDevPlugin 与 EulerMaker 集成教程:一键编译 openEuler 项目的终极方案 【免费下载链接】oeDevPlugin oeDevPlugin is designed for all developers, based on the widely-used IDE VSCode. It enables developers to quickly participate in openEuler community…

2026/7/16 9:42:20阅读更多 →
如何快速上手 oeDevPlugin:10 分钟学会在 VSCode 中克隆 openEuler 仓库 [特殊字符]

如何快速上手 oeDevPlugin:10 分钟学会在 VSCode 中克隆 openEuler 仓库 [特殊字符]

如何快速上手 oeDevPlugin:10 分钟学会在 VSCode 中克隆 openEuler 仓库 🚀 【免费下载链接】oeDevPlugin oeDevPlugin is designed for all developers, based on the widely-used IDE VSCode. It enables developers to quickly participate in openEu…

2026/7/16 9:42:20阅读更多 →
OpenFace 2.2.0:开源面部行为分析工具包的深度技术解析与实战指南

OpenFace 2.2.0:开源面部行为分析工具包的深度技术解析与实战指南

OpenFace 2.2.0:开源面部行为分析工具包的深度技术解析与实战指南 【免费下载链接】OpenFace OpenFace – a state-of-the art tool intended for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation. 项…

2026/7/16 13:38:17阅读更多 →
15个Obsidian模板:构建你的个人知识管理系统终极指南

15个Obsidian模板:构建你的个人知识管理系统终极指南

15个Obsidian模板:构建你的个人知识管理系统终极指南 【免费下载链接】Obsidian-Templates A repository containing templates and scripts for #Obsidian to support the #Zettelkasten method for note-taking. 项目地址: https://gitcode.com/gh_mirrors/ob/O…

2026/7/16 13:38:17阅读更多 →
抖音下载器完全指南:5分钟快速上手douyin-downloader

抖音下载器完全指南:5分钟快速上手douyin-downloader

抖音下载器完全指南:5分钟快速上手douyin-downloader 【免费下载链接】douyin-downloader A practical Douyin downloader for both single-item and profile batch downloads, with progress display, retries, SQLite deduplication, and browser fallback suppor…

2026/7/16 13:38:17阅读更多 →
如何利用openEuler SBOM-website实现软件成分可视化分析:完整指南

如何利用openEuler SBOM-website实现软件成分可视化分析:完整指南

如何利用openEuler SBOM-website实现软件成分可视化分析:完整指南 【免费下载链接】sbom-website A frontend service named sbom-website, designed for showing sbom secure supply chain governance process. 项目地址: https://gitcode.com/openeuler/sbom-we…

2026/7/16 13:38:17阅读更多 →
Copilot免费版代码补全准确率实测:Python/JS/TS三语言对比,第4项结果让团队连夜调整规范

Copilot免费版代码补全准确率实测:Python/JS/TS三语言对比,第4项结果让团队连夜调整规范

更多请点击: https://kaifayun.com 第一章:Copilot免费版代码补全准确率实测概览 为客观评估 GitHub Copilot 免费版(即 Copilot for Individuals 试用期或教育账户所享版本)在真实开发场景中的代码补全能力,我们选取…

2026/7/16 13:38:17阅读更多 →
如何高效使用SpiderFoot:15分钟掌握专业级OSINT信息收集与威胁情报工具

如何高效使用SpiderFoot:15分钟掌握专业级OSINT信息收集与威胁情报工具

如何高效使用SpiderFoot:15分钟掌握专业级OSINT信息收集与威胁情报工具 【免费下载链接】spiderfoot SpiderFoot automates OSINT for threat intelligence and mapping your attack surface. 项目地址: https://gitcode.com/GitHub_Trending/sp/spiderfoot …

2026/7/16 13:33:16阅读更多 →
VSCode TypeScript 环境配置对比:全局安装 vs 项目本地安装的4个关键差异

VSCode TypeScript 环境配置对比:全局安装 vs 项目本地安装的4个关键差异

VSCode TypeScript 环境配置对比:全局安装 vs 项目本地安装的4个关键差异当你在VSCode中启动一个新的TypeScript项目时,第一个技术决策往往从安装方式开始。这个看似简单的选择——全局安装还是项目本地安装——实际上会深刻影响你的开发流程、团队协作和…

2026/7/16 8:28:11阅读更多 →
智慧树刷课插件:5分钟实现自动化学习的智能助手

智慧树刷课插件:5分钟实现自动化学习的智能助手

智慧树刷课插件:5分钟实现自动化学习的智能助手 【免费下载链接】zhihuishu 智慧树刷课插件,自动播放下一集、1.5倍速度、无声 项目地址: https://gitcode.com/gh_mirrors/zh/zhihuishu 智慧树刷课插件是一款专为智慧树在线教育平台设计的Chrome浏…

2026/7/16 6:53:04阅读更多 →
Steam创意工坊下载器WorkshopDL:跨平台游戏模组获取的终极解决方案

Steam创意工坊下载器WorkshopDL:跨平台游戏模组获取的终极解决方案

Steam创意工坊下载器WorkshopDL:跨平台游戏模组获取的终极解决方案 【免费下载链接】WorkshopDL WorkshopDL - The Best Steam Workshop Downloader 项目地址: https://gitcode.com/gh_mirrors/wo/WorkshopDL 你是否在GOG或Epic Games Store购买了心仪的游戏…

2026/7/16 12:02:41阅读更多 →
A--10 Codex Review与GitHub PR工作流实战指南:从代码审查到安全合并

A--10 Codex Review与GitHub PR工作流实战指南:从代码审查到安全合并

摘要:本文系统讲解如何利用Codex App的Review功能与GitHub PR工作流,实现从代码修改到安全合并的完整流程。涵盖Review面板深度使用、/review命令实战、GitHub Connector配置、PR描述撰写技巧,以及常见问题排查方法。通过多个实战案例和流程图,帮助开发者建立高效的AI辅助代…

2026/7/16 0:00:38阅读更多 →
遗传算法解5皇后问题:从Hello World到工业优化的进化实验室

遗传算法解5皇后问题:从Hello World到工业优化的进化实验室

1. 项目概述:为什么用遗传算法解5皇后问题,而不是直接回溯?我带过十几届算法课,也给不少初创团队做过AI架构咨询。每次讲到组合优化问题,学生和工程师的第一反应永远是“写个回溯试试”。这没错——55棋盘上找所有合法…

2026/7/16 0:00:38阅读更多 →
5.1V稳压管输出为何只有4.7V?工作电流与负载影响分析

5.1V稳压管输出为何只有4.7V?工作电流与负载影响分析

前几天调试一个简单的电源模块,用到了5.1V稳压管。电路接好,上电测试,万用表一量——输出居然只有4.7V。第一反应是稳压管坏了,换了一个新的,结果还是4.7V。这让我想起很多初学者都会遇到的困惑:明明标称5.…

2026/7/16 0:00:38阅读更多 →
YOLOv8推理性能优化:从1.2FPS到35FPS的全链路加速实践

YOLOv8推理性能优化:从1.2FPS到35FPS的全链路加速实践

如果你在部署 YOLOv8 时,发现推理速度只有可怜的 1-2 FPS,而别人的演示视频却能跑到 30 FPS 以上,那么问题很可能不在模型本身,而在于你的整个处理链路。很多开发者拿到一个训练好的 YOLOv8 模型后,会直接使用官方示例…

2026/7/15 15:50:47阅读更多 →
Coze与Dify对比指南:低代码AI应用开发从入门到实战

Coze与Dify对比指南:低代码AI应用开发从入门到实战

1. 从零到一:为什么你需要了解 Coze 和 Dify?如果你对 AI 应用开发感兴趣,但一看到“大模型”、“智能体”、“工作流”这些词就头疼,觉得门槛太高,那这篇文章就是为你准备的。很多开发者,包括我自己&#…

2026/7/16 8:58:42阅读更多 →
AI生图工具怎么选?2026年6月版实测对比

AI生图工具怎么选?2026年6月版实测对比

做自媒体的朋友应该都有体会:配图一直是个让人头疼的问题。2026年,AI生图工具已经非常成熟了,但工具太多反而不知道怎么选。以下是截至2026年6月我对主流AI生图工具的实测对比。Midjourney V8.1:速度之王2026年6月11日&#xff0c…

2026/7/15 14:06:23阅读更多 →