OS/CentOS

nginx 소스 설치

구닥다리 엔지니어 2014. 4. 14. 12:23

1. nginx 다운로드

http://nginx.org/en/download.html

2. 압축 해제

# tar zxvf nginx-1.4.7.tar.gz

3. 환경설정

./configure --with-debug --with-http_ssl_module --with-http_realip_module --with-http_stub_status_module --prefix=/usr/local/nginx --conf-path=/etc/nginx/nginx

--prefix=/usr/local/nginx : 설치 위치를 지정

--conf-path=/etc/nginx/nginx : conf 파일의 위치를 지정하며, /etc/nginx가 conf 디렉토리가 된다. 빌드 전에 /etc/nginx 디렉토리를 생성하도록 한다.

4. 빌드

# make install