Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
def install_nginx():
"""Install nginx from source with the oboe module."""
NGINX_VERSION = "1.0.9"
sudo("apt-get install -y libpcre3 libpcre3-dev libgd2-noxpm-dev libgeoip-dev")
run("curl -O http://nginx.org/download/nginx-%s.tar.gz" % NGINX_VERSION)
run("wget http://packages.tracelytics.com/src/nginx_oboe-latest.tar.gz")
run("tar -xvzf nginx-%s.tar.gz" % NGINX_VERSION)
run("tar -xvzf nginx_oboe-latest.tar.gz")
with cd("nginx-%s" % NGINX_VERSION):
run("./configure --add-module=../nginx_oboe/ --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module")
sudo("make && make install")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment