Skip to content

Instantly share code, notes, and snippets.

@grimen
Last active December 14, 2015 00:09
Show Gist options
  • Save grimen/4996850 to your computer and use it in GitHub Desktop.
Save grimen/4996850 to your computer and use it in GitHub Desktop.
VENDOR="/tmp/vendor";
NGINX_TITLE='Nginx/OpenResty'
NGINX_NAME='ngx_openresty'
NGINX_TAG='v1.2.4.7'
NGINX_URL='git://github.com/agentzh/ngx_openresty.git'
NGINX_PATH="$VENDOR/$NGINX_NAME-$NGINX_TAG"
OPENRESTY_VERSION="1.2.6.6"
sudo apt-get -y install libreadline-dev libncurses5-dev libssl-dev perl python-setuptools ruby
# PCRE
cd /tmp
wget "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VERSION.tar.gz"
tar -xzvf "pcre-$PCRE_VERSION.tar.gz"
cd "pcre-$PCRE_VERSION"
./configure --enable-jit
make -j2
sudo make install
# Nginx/OpenResty
cd /tmp
wget "http://openresty.org/download/ngx_openresty-$OPENRESTY_VERSION.tar.gz"
tar xzvf "ngx_openresty-$OPENRESTY_VERSION.tar.gz"
cd "ngx_openresty-$OPENRESTY_VERSION/"
sudo ./configure \
--without-http_fastcgi_module \
--without-http_ssi_module \
--without-http_uwsgi_module \
--without-mail_pop3_module \
--without-mail_imap_module \
--without-mail_smtp_module \
\
--with-http_addition_module \
--with-google_perftools_module \
--with-http_gzip_static_module \
--with-http_random_index_module \
--with-http_realip_module \
--with-http_secure_link_module \
--with-http_ssl_module \
--with-http_stub_status_module \
--with-http_sub_module \
--with-ld-opt="-L /usr/local/lib" \
--with-cc-opt="-I /usr/local/include" \
--with-pcre-jit
make -j2
sudo make install
echo "DONE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment