Skip to content

Instantly share code, notes, and snippets.

@amasho
Created December 25, 2012 11:20
Show Gist options
  • Select an option

  • Save amasho/4372741 to your computer and use it in GitHub Desktop.

Select an option

Save amasho/4372741 to your computer and use it in GitHub Desktop.
nginxインストールメモ

MEMO

homebrewでそれぞれインストール

$ brew install mongodb
$ brew install redis
$ brew install lua

nginx本体

$ wget http://nginx.org/download/nginx-1.2.5.tar.gz
$ tar xvfz nginx-1.2.5.tar.gz
$ cd nginx-1.2.5

nginx周りの追加モジュール達

$ git clone https://github.com/yaoweibin/nginx_tcp_proxy_module.git
$ git clone https://github.com/chaoslawful/lua-nginx-module.git
$ wget http://people.FreeBSD.org/~osa/ngx_http_redis-0.3.5.tar.gz
$ tar xvfz ngx_http_redis-0.3.5.tar.gz

configure

$ ./configure \
--conf-path=/etc/nginx/nginx.conf \
--prefix=/usr/local/nginx \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--sbin-path=sbin/nginx \
--with-debug \
--with-ld-opt="-L /usr/local/lib" \
--with-http_ssl_module \
--with-http_gzip_static_module \
--without-http-cache \
--without-http_access_module \
--without-http_autoindex_module \
--without-http_empty_gif_module \
--without-http_ssi_module \
--without-http_auth_basic_module \
--without-http_browser_module \
--without-http_geo_module \
--without-http_referer_module \
--without-http_charset_module \
--without-http_fastcgi_module \
--without-http_geo_module \
--without-http_scgi_module \
--without-http_split_clients_module \
--without-http_userid_module \
--without-http_upstream_ip_hash_module \
--without-http_proxy_module \
--http-proxy-temp-path=/var/tmp/nginx/proxy_temp \
--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp \
--http-client-body-temp-path=/var/tmp/nginx/client_body_temp \
--http-log-path=/var/log/nginx/access.log \
--add-module=nginx_tcp_proxy_module/ \
--add-module=lua-nginx-module \
--add-module=ngx_http_redis-0.3.6

make & install

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