Skip to content

Instantly share code, notes, and snippets.

@nick-kravchenko
Forked from gdarko/nginx-latest.sh
Created July 31, 2018 13:22
Show Gist options
  • Save nick-kravchenko/bd04358b2ccf3974c3fdc84a825417c5 to your computer and use it in GitHub Desktop.
Save nick-kravchenko/bd04358b2ccf3974c3fdc84a825417c5 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