Skip to content

Instantly share code, notes, and snippets.

@gdarko
Forked from Globegitter/nginx-latest.sh
Last active November 5, 2018 08:41
Show Gist options
  • Save gdarko/3f41f9c7dfc7aa59d727 to your computer and use it in GitHub Desktop.
Save gdarko/3f41f9c7dfc7aa59d727 to your computer and use it in GitHub Desktop.
Install the latest nginx from source for Debian 8
# Automatically instal the latest nginx
wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add -
#Make a backup copy of your current sources.list file
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
#Now copy the following repositories to the end of ` /etc/apt/sources.list`
echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" | tee -a /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/mainline/debian/ jessie nginx" | tee -a /etc/apt/sources.list
#update to get the new repository
sudo apt-get update
sudo apt-get install nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment