본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

소스에서 nginx 빌드하기

원문 보기 위키 갱신

이 페이지에서는 nginx를 소스 코드에서 직접 빌드하는 방법을 설명해요. 빌드는 configure 명령으로 설정하며, nginx가 연결 처리를 위해 사용할 수 있는 방식 등 시스템의 여러 측면을 정의하고, 마지막에 Makefile을 만들어요.

출처: 문서

본문

빌드는 configure 명령을 사용해서 설정해요. 이 명령은 nginx가 연결 처리에 사용할 수 있는 방법을 포함해 시스템의 다양한 측면을 정의해요. 마지막에는 Makefile을 생성해요.

configure 명령은 다음 매개변수를 지원해요.

  • --help — 도움말 메시지를 출력해요.

  • --prefix=path — 서버 파일을 보관할 디렉터리를 정의해요. 이 디렉터리는 configure가 설정하는 모든 상대 경로(라이브러리 소스 경로는 제외)와 nginx.conf 설정 파일에서도 동일하게 사용돼요. 기본값은 /usr/local/nginx 디렉터리예요.

  • --sbin-path=path — nginx 실행 파일의 이름을 설정해요. 이 이름은 설치할 때만 사용돼요. 기본적으로 파일 이름은 prefix/sbin/nginx예요.

  • --modules-path=path — nginx 동적 모듈이 설치될 디렉터리를 정의해요. 기본적으로 prefix/modules 디렉터리를 사용해요.

  • --conf-path=path — nginx.conf 설정 파일의 이름을 설정해요. 필요하다면 명령줄 매개변수 -c file로 다른 설정 파일을 지정해서 nginx를 시작할 수도 있어요. 기본적으로 파일 이름은 prefix/conf/nginx.conf예요.

  • --error-log-path=path — 기본 오류·경고·진단 파일의 이름을 설정해요. 설치 후에는 nginx.conf 설정 파일의 error_log 지시어로 파일 이름을 언제든지 바꿀 수 있어요. 기본적으로 파일 이름은 prefix/logs/error.log예요.

  • --pid-path=path — main 프로세스의 프로세스 ID를 저장할 nginx.pid 파일의 이름을 설정해요. 설치 후에는 nginx.conf 설정 파일의 pid 지시어로 파일 이름을 언제든지 바꿀 수 있어요. 기본적으로 파일 이름은 prefix/logs/nginx.pid예요.

  • --lock-path=path — 잠금(lock) 파일 이름의 접두사를 설정해요. 설치 후에는 nginx.conf 설정 파일의 lock_file 지시어로 값을 언제든지 바꿀 수 있어요. 기본값은 prefix/logs/nginx.lock이에요.

  • --user=name — worker 프로세스가 사용할 권한 없는(unprivileged) 사용자의 이름을 설정해요. 설치 후에는 nginx.conf 설정 파일의 user 지시어로 이름을 언제든지 바꿀 수 있어요. 기본 사용자 이름은 nobody예요.

  • --group=name — worker 프로세스가 사용할 그룹의 이름을 설정해요. 설치 후에는 nginx.conf 설정 파일의 user 지시어로 언제든지 바꿀 수 있어요. 기본적으로 그룹 이름은 권한 없는 사용자의 이름으로 설정돼요.

  • --build=name — 선택적인 nginx 빌드 이름을 설정해요.

  • --builddir=path — 빌드 디렉터리를 설정해요.

  • --with-select_module / --without-select_module — 서버가 select() 메서드로 동작할 수 있게 하는 모듈의 빌드를 활성화하거나 비활성화해요. 플랫폼이 kqueue, epoll, /dev/poll처럼 더 적절한 메서드를 지원하지 않는 것처럼 보이면 이 모듈은 자동으로 빌드돼요.

  • --with-poll_module / --without-poll_module — 서버가 poll() 메서드로 동작할 수 있게 하는 모듈의 빌드를 활성화하거나 비활성화해요. 플랫폼이 더 적절한 메서드를 지원하지 않는 것처럼 보이면 이 모듈은 자동으로 빌드돼요.

  • --with-control-api — nginx 제어 REST API(1.31.5)의 사용을 활성화해요. 명령줄 매개변수 -l도 함께 참고하세요.

  • --with-threads — 스레드 풀(thread pools)의 사용을 활성화해요.

  • --with-file-aio — FreeBSD와 Linux에서 비동기 파일 I/O(AIO)의 사용을 활성화해요.

  • --with-http_ssl_module — HTTP 서버에 HTTPS 프로토콜 지원을 추가하는 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요. 이 모듈을 빌드하고 실행하려면 OpenSSL 라이브러리가 필요해요.

  • --with-http_v2_module — HTTP/2를 지원하는 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_v3_module — HTTP/3를 지원하는 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요. 이 모듈을 빌드하고 실행하려면 HTTP/3를 지원하는 OpenSSL 라이브러리가 필요해요.

  • --with-http_realip_module — 지정된 헤더 필드에 보내진 주소로 클라이언트 주소를 바꾸는 ngx_http_realip_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_addition_module — 응답의 앞뒤에 텍스트를 추가하는 ngx_http_addition_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_xslt_module / --with-http_xslt_module=dynamic — 하나 이상의 XSLT 스타일시트로 XML 응답을 변환하는 ngx_http_xslt_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요. 이 모듈을 빌드하고 실행하려면 libxml2와 libxslt 라이브러리가 필요해요.

  • --with-http_image_filter_module / --with-http_image_filter_module=dynamic — JPEG, GIF, PNG, WebP 형식의 이미지를 변환하는 ngx_http_image_filter_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_geoip_module / --with-http_geoip_module=dynamic — 클라이언트 IP 주소와 사전 컴파일된 MaxMind 데이터베이스에 따라 변수를 만드는 ngx_http_geoip_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_sub_module — 하나의 지정된 문자열을 다른 문자열로 바꿔 응답을 수정하는 ngx_http_sub_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_dav_module — WebDAV 프로토콜을 통해 파일 관리 자동화를 제공하는 ngx_http_dav_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_flv_module — Flash Video(FLV) 파일에 대해 서버 측 의사 스트리밍(pseudo-streaming)을 지원하는 ngx_http_flv_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_mp4_module — MP4 파일에 대해 서버 측 의사 스트리밍을 지원하는 ngx_http_mp4_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_gunzip_module — "gzip" 인코딩 방식을 지원하지 않는 클라이언트를 위해 "Content-Encoding: gzip"으로 압축된 응답을 해제하는 ngx_http_gunzip_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_gzip_static_module — 일반 파일 대신 ".gz" 확장자를 가진 사전 압축 파일을 보낼 수 있게 하는 ngx_http_gzip_static_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_auth_request_module — 하위 요청(subrequest)의 결과를 기반으로 클라이언트 인증을 구현하는 ngx_http_auth_request_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_random_index_module — 슬래시 문자('/')로 끝나는 요청을 처리하고 인덱스 파일로 서빙할 파일을 디렉터리에서 무작위로 고르는 ngx_http_random_index_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_secure_link_module — ngx_http_secure_link_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_degradation_module — ngx_http_degradation_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_slice_module — 요청을 각각 특정 응답 범위를 반환하는 하위 요청으로 나누는 ngx_http_slice_module 모듈의 빌드를 활성화해요. 이 모듈은 큰 응답을 더 효과적으로 캐싱할 수 있게 해줘요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_stub_status_module — 기본 상태 정보에 접근할 수 있게 하는 ngx_http_stub_status_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-http_json_module — JSON 문서에서 추출한 값을 가진 변수를 만드는 ngx_http_json_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --without-http_charset_module — "Content-Type" 응답 헤더 필드에 지정된 charset을 추가하고, 필요에 따라 데이터를 한 charset에서 다른 charset으로 변환할 수도 있는 ngx_http_charset_module 모듈의 빌드를 비활성화해요.

  • --without-http_gzip_module — HTTP 서버의 응답을 압축하는 모듈의 빌드를 비활성화해요. 이 모듈을 빌드하고 실행하려면 zlib 라이브러리가 필요해요.

  • --without-http_ssi_module — 통과하는 응답에서 SSI(Server Side Includes) 명령을 처리하는 ngx_http_ssi_module 모듈의 빌드를 비활성화해요.

  • --without-http_userid_module — 클라이언트 식별에 적합한 쿠키를 설정하는 ngx_http_userid_module 모듈의 빌드를 비활성화해요.

  • --without-http_access_module — 특정 클라이언트 주소로의 접근을 제한하는 ngx_http_access_module 모듈의 빌드를 비활성화해요.

  • --without-http_auth_basic_module — "HTTP Basic Authentication" 프로토콜로 사용자 이름과 비밀번호를 검증해 리소스 접근을 제한하는 ngx_http_auth_basic_module 모듈의 빌드를 비활성화해요.

  • --without-http_mirror_module — 백그라운드 미러 하위 요청을 만들어 원본 요청의 미러링을 구현하는 ngx_http_mirror_module 모듈의 빌드를 비활성화해요.

  • --without-http_autoindex_module — 슬래시 문자('/')로 끝나는 요청을 처리하고, ngx_http_index_module 모듈이 인덱스 파일을 찾지 못할 경우 디렉터리 목록을 생성하는 ngx_http_autoindex_module 모듈의 빌드를 비활성화해요.

  • --without-http_geo_module — 클라이언트 IP 주소에 따라 값을 가지는 변수를 만드는 ngx_http_geo_module 모듈의 빌드를 비활성화해요.

  • --without-http_map_module — 다른 변수의 값에 따라 값을 가지는 변수를 만드는 ngx_http_map_module 모듈의 빌드를 비활성화해요.

  • --without-http_split_clients_module — A/B 테스트용 변수를 만드는 ngx_http_split_clients_module 모듈의 빌드를 비활성화해요.

  • --without-http_referer_module — "Referer" 헤더 필드에 잘못된 값이 있는 요청에 대해 사이트 접근을 차단할 수 있는 ngx_http_referer_module 모듈의 빌드를 비활성화해요.

  • --without-http_rewrite_module — HTTP 서버가 요청을 리다이렉트하고 요청의 URI를 변경할 수 있게 하는 모듈의 빌드를 비활성화해요. 이 모듈을 빌드하고 실행하려면 PCRE 라이브러리가 필요해요.

  • --without-http_proxy_module — HTTP 서버 프록시 모듈의 빌드를 비활성화해요.

  • --without-http_fastcgi_module — 요청을 FastCGI 서버로 전달하는 ngx_http_fastcgi_module 모듈의 빌드를 비활성화해요.

  • --without-http_uwsgi_module — 요청을 uwsgi 서버로 전달하는 ngx_http_uwsgi_module 모듈의 빌드를 비활성화해요.

  • --without-http_scgi_module — 요청을 SCGI 서버로 전달하는 ngx_http_scgi_module 모듈의 빌드를 비활성화해요.

  • --without-http_grpc_module — 요청을 gRPC 서버로 전달하는 ngx_http_grpc_module 모듈의 빌드를 비활성화해요.

  • --without-http_tunnel_module — HTTP/1.1 CONNECT 요청을 처리하고 종단 간 가상 연결을 설정하는 ngx_http_tunnel_module 모듈의 빌드를 비활성화해요.

  • --without-http_memcached_module — memcached 서버에서 응답을 얻는 ngx_http_memcached_module 모듈의 빌드를 비활성화해요.

  • --without-http_limit_conn_module — 키당 연결 수(예: 단일 IP 주소에서 오는 연결 수)를 제한하는 ngx_http_limit_conn_module 모듈의 빌드를 비활성화해요.

  • --without-http_limit_req_module — 키당 요청 처리 속도(예: 단일 IP 주소에서 오는 요청의 처리 속도)를 제한하는 ngx_http_limit_req_module 모듈의 빌드를 비활성화해요.

  • --without-http_empty_gif_module — 단일 픽셀 투명 GIF를 내보내는 모듈의 빌드를 비활성화해요.

  • --without-http_browser_module — "User-Agent" 요청 헤더 필드의 값에 따라 값을 가지는 변수를 만드는 ngx_http_browser_module 모듈의 빌드를 비활성화해요.

  • --without-http_upstream_hash_module — hash 로드 밸런싱 메서드를 구현하는 모듈의 빌드를 비활성화해요.

  • --without-http_upstream_ip_hash_module — ip_hash 로드 밸런싱 메서드를 구현하는 모듈의 빌드를 비활성화해요.

  • --without-http_upstream_least_conn_module — least_conn 로드 밸런싱 메서드를 구현하는 모듈의 빌드를 비활성화해요.

  • --without-http_upstream_least_time_module — least_time 로드 밸런싱 메서드를 구현하는 모듈의 빌드를 비활성화해요.

  • --without-http_upstream_random_module — random 로드 밸런싱 메서드를 구현하는 모듈의 빌드를 비활성화해요.

  • --without-http_upstream_keepalive_module — upstream 서버에 대한 연결 캐싱을 제공하는 모듈의 빌드를 비활성화해요.

  • --without-http_upstream_zone_module — upstream 그룹의 런타임 상태를 공유 메모리 영역에 저장할 수 있게 하는 모듈의 빌드를 비활성화해요.

  • --without-http_upstream_sticky_module — upstream 서버에 대한 세션 어피니티(session affinity)를 제공하는 모듈의 빌드를 비활성화해요.

  • --with-http_perl_module / --with-http_perl_module=dynamic — 임베디드 Perl 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-perl_modules_path=path — Perl 모듈을 보관할 디렉터리를 정의해요.

  • --with-perl=path — Perl 바이너리의 이름을 설정해요.

  • --http-log-path=path — HTTP 서버의 기본 요청 로그 파일 이름을 설정해요. 설치 후에는 nginx.conf 설정 파일의 access_log 지시어로 파일 이름을 언제든지 바꿀 수 있어요. 기본적으로 파일 이름은 prefix/logs/access.log예요.

  • --http-client-body-temp-path=path — 클라이언트 요청 본문을 담는 임시 파일을 저장할 디렉터리를 정의해요. 설치 후에는 nginx.conf 설정 파일의 client_body_temp_path 지시어로 디렉터리를 언제든지 바꿀 수 있어요. 기본적으로 디렉터리 이름은 prefix/client_body_temp예요.

  • --http-proxy-temp-path=path — 프록시 대상 서버에서 받은 데이터를 담는 임시 파일을 저장할 디렉터리를 정의해요. 설치 후에는 nginx.conf 설정 파일의 proxy_temp_path 지시어로 언제든지 바꿀 수 있어요. 기본적으로 디렉터리 이름은 prefix/proxy_temp이에요.

  • --http-fastcgi-temp-path=path — FastCGI 서버에서 받은 데이터를 담는 임시 파일을 저장할 디렉터리를 정의해요. 설치 후에는 nginx.conf 설정 파일의 fastcgi_temp_path 지시어로 언제든지 바꿀 수 있어요. 기본적으로 디렉터리 이름은 prefix/fastcgi_temp예요.

  • --http-uwsgi-temp-path=path — uwsgi 서버에서 받은 데이터를 담는 임시 파일을 저장할 디렉터리를 정의해요. 설치 후에는 nginx.conf 설정 파일의 uwsgi_temp_path 지시어로 언제든지 바꿀 수 있어요. 기본적으로 디렉터리 이름은 prefix/uwsgi_temp예요.

  • --http-scgi-temp-path=path — SCGI 서버에서 받은 데이터를 담는 임시 파일을 저장할 디렉터리를 정의해요. 설치 후에는 nginx.conf 설정 파일의 scgi_temp_path 지시어로 언제든지 바꿀 수 있어요. 기본적으로 디렉터리 이름은 prefix/scgi_temp이에요.

  • --without-http — HTTP 서버를 비활성화해요.

  • --without-http-cache — HTTP 캐시를 비활성화해요.

  • --with-mail / --with-mail=dynamic — POP3/IMAP4/SMTP 메일 프록시 서버를 활성화해요.

  • --with-mail_ssl_module — 메일 프록시 서버에 SSL/TLS 프로토콜 지원을 추가하는 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요. 이 모듈을 빌드하고 실행하려면 OpenSSL 라이브러리가 필요해요.

  • --without-mail_pop3_module — 메일 프록시 서버에서 POP3 프로토콜을 비활성화해요.

  • --without-mail_imap_module — 메일 프록시 서버에서 IMAP 프로토콜을 비활성화해요.

  • --without-mail_smtp_module — 메일 프록시 서버에서 SMTP 프로토콜을 비활성화해요.

  • --with-stream / --with-stream=dynamic — 일반적인 TCP/UDP 프록시 및 로드 밸런싱을 위한 stream 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-stream_ssl_module — stream 모듈에 SSL/TLS 프로토콜 지원을 추가하는 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요. 이 모듈을 빌드하고 실행하려면 OpenSSL 라이브러리가 필요해요.

  • --with-stream_realip_module — PROXY 프로토콜 헤더에서 보내진 주소로 클라이언트 주소를 바꾸는 ngx_stream_realip_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-stream_geoip_module / --with-stream_geoip_module=dynamic — 클라이언트 IP 주소와 사전 컴파일된 MaxMind 데이터베이스에 따라 변수를 만드는 ngx_stream_geoip_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --with-stream_ssl_preread_module — SSL/TLS를 종료하지 않고 ClientHello 메시지에서 정보를 추출할 수 있게 하는 ngx_stream_ssl_preread_module 모듈의 빌드를 활성화해요. 이 모듈은 기본적으로 빌드되지 않아요.

  • --without-stream_limit_conn_module — 키당 연결 수(예: 단일 IP 주소에서 오는 연결 수)를 제한하는 ngx_stream_limit_conn_module 모듈의 빌드를 비활성화해요.

  • --without-stream_access_module — 특정 클라이언트 주소로의 접근을 제한하는 ngx_stream_access_module 모듈의 빌드를 비활성화해요.

  • --without-stream_geo_module — 클라이언트 IP 주소에 따라 값을 가지는 변수를 만드는 ngx_stream_geo_module 모듈의 빌드를 비활성화해요.

  • --without-stream_map_module — 다른 변수의 값에 따라 값을 가지는 변수를 만드는 ngx_stream_map_module 모듈의 빌드를 비활성화해요.

  • --without-stream_split_clients_module — A/B 테스트용 변수를 만드는 ngx_stream_split_clients_module 모듈의 빌드를 비활성화해요.

  • --without-stream_return_module — 지정된 값을 클라이언트에게 보낸 후 연결을 닫는 ngx_stream_return_module 모듈의 빌드를 비활성화해요.

  • --without-stream_pass_module — 수락된 연결을 다른 리슨 소켓으로 전달하는 ngx_stream_pass_module 모듈의 빌드를 비활성화해요.

  • --without-stream_set_module — 변수에 값을 설정하는 ngx_stream_set_module 모듈의 빌드를 비활성화해요.

  • --without-stream_upstream_hash_module — hash 로드 밸런싱 메서드를 구현하는 모듈의 빌드를 비활성화해요.

  • --without-stream_upstream_least_conn_module — least_conn 로드 밸런싱 메서드를 구현하는 모듈의 빌드를 비활성화해요.

  • --without-stream_upstream_least_time_module — least_time 로드 밸런싱 메서드를 구현하는 모듈의 빌드를 비활성화해요.

  • --without-stream_upstream_random_module — random 로드 밸런싱 메서드를 구현하는 모듈의 빌드를 비활성화해요.

  • --without-stream_upstream_zone_module — upstream 그룹의 런타임 상태를 공유 메모리 영역에 저장할 수 있게 하는 모듈의 빌드를 비활성화해요.

  • --with-google_perftools_module — Google Performance Tools를 사용해 nginx worker 프로세스의 프로파일링을 활성화하는 ngx_google_perftools_module 모듈의 빌드를 활성화해요. 이 모듈은 nginx 개발자를 위한 것이며 기본적으로 빌드되지 않아요.

  • --with-cpp_test_module — ngx_cpp_test_module 모듈의 빌드를 활성화해요.

  • --add-module=path — 외부 모듈을 활성화해요.

  • --add-dynamic-module=path — 외부 동적 모듈을 활성화해요.

  • --with-compat — 동적 모듈 호환성을 활성화해요.

  • --with-cc=path — C 컴파일러의 이름을 설정해요.

  • --with-cpp=path — C 전처리기의 이름을 설정해요.

  • --with-cc-opt=parameters — CFLAGS 변수에 추가될 추가 매개변수를 설정해요. FreeBSD에서 시스템 PCRE 라이브러리를 사용할 때는 --with-cc-opt="-I /usr/local/include"를 지정해야 해요. select()가 지원하는 파일 수를 늘려야 한다면 --with-cc-opt="-D FD_SETSIZE=2048"처럼 여기에서 지정할 수도 있어요.

  • --with-ld-opt=parameters — 링크 중에 사용될 추가 매개변수를 설정해요. FreeBSD에서 시스템 PCRE 라이브러리를 사용할 때는 --with-ld-opt="-L /usr/local/lib"를 지정해야 해요.

  • --with-cpu-opt=cpu — 지정된 CPU에 맞춰 빌드를 활성화해요: pentium, pentiumpro, pentium3, pentium4, athlon, opteron, sparc32, sparc64, ppc64.

  • --without-pcre — PCRE 라이브러리 사용을 비활성화해요.

  • --with-pcre — PCRE 라이브러리 사용을 강제해요.

  • --with-pcre=path — PCRE 라이브러리 소스의 경로를 설정해요. 라이브러리 배포판을 PCRE 사이트에서 다운로드해서 압축을 풀어야 해요. 나머지는 nginx의 ./configure와 make가 처리해요. 이 라이브러리는 location 지시어의 정규식 지원과 ngx_http_rewrite_module 모듈에 필요해요.

  • --with-pcre-opt=parameters — PCRE에 대한 추가 빌드 옵션을 설정해요.

  • --with-pcre-jit — "just-in-time compilation" 지원으로 PCRE 라이브러리를 빌드해요(1.1.12, pcre_jit 지시어).

  • --without-pcre2 — 원래 PCRE 라이브러리 대신 PCRE2 라이브러리 사용을 비활성화해요(1.21.5).

  • --with-zlib=path — zlib 라이브러리 소스의 경로를 설정해요. 라이브러리 배포판을 zlib 사이트에서 다운로드해서 압축을 풀어야 해요. 나머지는 nginx의 ./configure와 make가 처리해요. 이 라이브러리는 ngx_http_gzip_module 모듈에 필요해요.

  • --with-zlib-opt=parameters — zlib에 대한 추가 빌드 옵션을 설정해요.

  • --with-zlib-asm=cpu — 지정된 CPU 중 하나에 최적화된 zlib 어셈블러 소스의 사용을 활성화해요: pentium, pentiumpro.

  • --with-libatomic — libatomic_ops 라이브러리 사용을 강제해요.

  • --with-libatomic=path — libatomic_ops 라이브러리 소스의 경로를 설정해요.

  • --with-openssl=path — OpenSSL 라이브러리 소스의 경로를 설정해요.

  • --with-openssl-opt=parameters — OpenSSL에 대한 추가 빌드 옵션을 설정해요.

  • --with-debug — 디버깅 로그를 활성화해요.

매개변수 사용 예시(이 모두를 한 줄에 입력해야 해요):

./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=../pcre2-10.39
    --with-zlib=../zlib-1.3

구성(configuration)이 끝나면 make를 사용해 nginx를 컴파일하고 설치해요.

더 알아보기 (Learn more)