Skip to content

Instantly share code, notes, and snippets.

@ericcholis
Last active October 6, 2015 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericcholis/0c6c341d2af8a1a6c3a1 to your computer and use it in GitHub Desktop.
Save ericcholis/0c6c341d2af8a1a6c3a1 to your computer and use it in GitHub Desktop.
Install Mainline Nginx and add modules
readonly RELEASE=$(lsb_release -cs)
wget http://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key
echo "deb http://nginx.org/packages/mainline/ubuntu/ $RELEASE nginx" >> /etc/apt/sources.list.d/nginx.list
echo "deb-src http://nginx.org/packages/mainline/ubuntu/ $RELEASE nginx" >> /etc/apt/sources.list.d/nginx.list
apt-get update
apt-get upgrade
apt-get install dpkg-dev mercurial
mkdir /opt/rebuildnginx
hg clone http://hg.nginx.org/njs /opt/njs
cd /opt/rebuildnginx
apt-get source nginx
apt-get build-dep nginx
# add --add-module=/opt/njs/nginx to /opt/rebuildnginx/<NGINX_VERSION>/debian/rules
cd /opt/rebuildnginx/<NGINX_VERSION>
dpkg-buildpackage -b
dpkg --install nginx_1.9.5-1~trusty_amd64.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment