이 글은 기계 번역의 미러 문서이며, 원본 기사로 바로 이동하려면 여기를 클릭해 주세요.

보기: 17054|회답: 2

[웹] 구현: nginx 동적 덧셈 모듈이 설치되었습니다

[링크 복사]
게시됨 2016. 12. 7. 오후 1:39:50 | | | |
설명:
이미 nginx를 설치했다면, 컴파일되고 설치되지 않은 모듈을 추가해야 하는데, 어떻게 하시나요?

구체적으로:
서드파티 ngx_http_google_filter_module 모듈 설치 예시입니다
nginx의 모듈은 Apache처럼 .so 설정을 하는 대신 nginx를 다시 컴파일해야 한다는 것입니다
1. 서드파티 확장 프로그램 다운로드 ngx_http_google_filter_module

# CD /데이터/소프트웨어/
# 복제 https://github.com/cuber/ngx_http_google_filter_module

2. nginx를 컴파일하고 설치할 때 어떤 모듈이 설치되어 있는지 확인하세요

# 응긴스 -V
nginx 버전: nginx/1.8.0
GCC 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) 제작
OpenSSL 1.0.1e-fips 사용으로 구축됨 2013년 2월 11일
TLS SNI 지원 활성화
인수 구성: --prefix=/usr/local/nginx --with-http_ssl_module --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module --add-module=/data/software/ngx_http_substitutions_filter_module

컴파일 및 설치에서 --prefix=/usr/local/nginx --with-http_ssl_module --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module --add-module=/data/software/ngx_http_substitutions_filter_module 이 매개변수들입니다. --add-module=/data/software/ngx_http_substitutions_filter_module은 이전 컴파일에서 모듈을 추가할 때 추가ngx_http_substitutions_filter_module

3. 설치해야 할 모듈을 추가하고 다시 컴파일하세요. 예를 들어 여기에 –add-module=/data/software/ngx_http_google_filter_module 추가하는 것

# ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module --add-module=/data/software/ngx_http_substitutions_filter_module --add-module=/data/software/ngx_http_google_filter_module
# 만드세요 // 설치하지 마세요, 안 그러면 정말 덮어써질 거예요

4. nginx 이진 교체:

# CP /USR/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak

# CP ./objs/nginx /USR/Local/nginx/sbin/

(참고로, 이 문장을 실행할 때 오류가 발생할 수 있습니다. cp: not create regular file '/service/nginx-1.10.2/sbin/nginx': 텍스트 파일 사용 중입니다. nginx 파일이 아직 사용 중이기 때문입니다. 모듈을 다시 추가할 때는 먼저 nginx를 중지하는 것이 가장 좋습니다!! )






이전의:nginx: [error] open() /nginx.pid failed (2: No such file or directory)
다음:nginx는 프록시 캐싱을 설정합니다
 집주인| 게시됨 2018. 4. 27. 오전 10:18:10 |
nginx는 서드파티 모듈을 추가하고, NGINX에서 기본적으로 지원하는 모듈을 가능하게 합니다
http://www.itsvse.com/thread-4713-1-1.html
(출처: Architect_Programmer)
참고 기사
게시됨 2019. 6. 2. 오전 12:54:39 |
공유해 주셔서 감사합니다
면책 조항:
Code Farmer Network에서 발행하는 모든 소프트웨어, 프로그래밍 자료 또는 기사는 학습 및 연구 목적으로만 사용됩니다; 위 내용은 상업적 또는 불법적인 목적으로 사용되지 않으며, 그렇지 않으면 모든 책임이 사용자에게 부담됩니다. 이 사이트의 정보는 인터넷에서 가져온 것이며, 저작권 분쟁은 이 사이트와는 관련이 없습니다. 위 내용은 다운로드 후 24시간 이내에 컴퓨터에서 완전히 삭제해야 합니다. 프로그램이 마음에 드신다면, 진짜 소프트웨어를 지원하고, 등록을 구매하며, 더 나은 진짜 서비스를 받아주세요. 침해가 있을 경우 이메일로 연락해 주시기 바랍니다.

Mail To:help@itsvse.com