Skip to content

Instantly share code, notes, and snippets.

@g-k
Created February 16, 2012 03:04
Show Gist options
  • Save g-k/1841336 to your computer and use it in GitHub Desktop.
Save g-k/1841336 to your computer and use it in GitHub Desktop.
build nginx with syslog
NGINX_VERSION=1.0.6
PCRE_VERSION=8.12
# Download nginx
if `test ! -f nginx-${NGINX_VERSION}.tar.gz`; then
wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
fi
tar -xzf nginx-${NGINX_VERSION}.tar.gz
# Download PCRE for the URL rewrite module
if `test ! -f pcre-${PCRE_VERSION}.tar.bz2`; then
wget -O pcre-${PCRE_VERSION}.tar.bz2 http://sourceforge.net/projects/pcre/files/pcre/${PCRE_VERSION}/pcre-${PCRE_VERSION}.tar.bz2/download
fi
tar -xjf pcre-${PCRE_VERSION}.tar.bz2
PATCH_DIR=nginx_syslog_patch
if `test ! -d nginx_syslog_patch`; then
git clone https://github.com/yaoweibin/nginx_syslog_patch.git
fi
cd nginx_syslog_patch; git pull; cd ..
cd nginx-${NGINX_VERSION}
patch -p1 < $WORKSPACE/${PATCH_DIR}/syslog_0.8.54.patch
./configure --add-module=$WORKSPACE/${PATCH_DIR} --with-pcre=$WORKSPACE/pcre-${PCRE_VERSION}
make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment