Skip to content

Instantly share code, notes, and snippets.

@duggan
Last active December 18, 2015 09:49
Show Gist options
  • Save duggan/5764487 to your computer and use it in GitHub Desktop.
Save duggan/5764487 to your computer and use it in GitHub Desktop.
Add nginx official deb sources
apt-get install -y curl
# Install nginx
if [ "xx" = "x$(grep 'nginx' /etc/apt/sources.list )x" ] ; then
echo 'Installing nginx...'
echo '
# Repositories for up to date nginx packages
deb http://nginx.org/packages/mainline/ubuntu/ precise nginx
deb-src http://nginx.org/packages/mainline/ubuntu/ precise nginx' >> /etc/apt/sources.list
curl -s http://nginx.org/keys/nginx_signing.key | apt-key add -
apt-get update > /dev/null
apt-get install -y nginx
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment