Skip to content

Instantly share code, notes, and snippets.

@ainvyu
Created May 6, 2013 05:03
Show Gist options
  • Save ainvyu/5523460 to your computer and use it in GitHub Desktop.
Save ainvyu/5523460 to your computer and use it in GitHub Desktop.
nginx 컴파일 옵션

Install dependencies

sudo apt-get install libpcre3-dev zlib1g-dev libgd2-xpm-dev libssl-dev

Configure and make

./configure \
--prefix=/usr/local/stow/nginx \
--conf-path=/etc/nginx/nginx.conf \
--sbin-path=/usr/sbin \
--http-log-path=/var/log/nginx/access.log \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--http-client-body-temp-path=/var/lib/nginx/body \
--http-proxy-temp-path=/var/lib/nginx/proxy \
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp \
--http-uwsgi-temp-path=/var/tmp/nginx/fastcgi_temp \
--http-scgi-temp-path=/var/tmp/nginx/fastcgi_temp \
--with-ipv6 \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_image_filter_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_gzip_static_module \
--with-http_secure_link_module \
--with-http_stub_status_module \
--with-http_spdy_module \
--with-md5-asm \
--with-sha1-asm \
--with-openssl=/usr/src/openssl-1.0.1 \
--with-sha1=/usr/lib \
--user=www-data \
--group=www-data

make
make install    

--with-openssl 옵션의 경로는 설치된 openssl의 include를 가리키는 것이 아니라 openssl 소스가 있는 경로를 가리킨다. 또한 --with-openssl 옵션은 사용자가 직접 컴파일한 openssl이 아니라 ssl libs가 built된 것을 설치했다면 위 구문에서 해당 라인을 빼고 명령을 내린다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment