Add Latest Nginx Debian Apt Repo
Hello Debian User! This Tip Shows You Step-by-Step How-to Setup Latest Nginx ‘Mainline’ Version Debian Apt Repo.
Especially relevant: the Nginx ‘Mainline’ version is generally regarded as more Reliable because of all bug fixes.
-
Login as Super User
su -
-
Then to Set Up the Nginx Mainline Apt Repo
-
For Debian 9
echo "deb http://nginx.org/packages/mainline/debian/ stretch nginx" \ | sudo tee -a /etc/apt/sources.list.d/nginx.list
echo "deb-src http://nginx.org/packages/mainline/debian/ stretch nginx" \ | sudo tee -a /etc/apt/sources.list.d/nginx.list
-
For Debian 8
echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" \ | sudo tee -a /etc/apt/sources.list.d/nginx.list
echo "deb-src http://nginx.org/packages/mainline/debian/ jessie nginx" \ | sudo tee -a /etc/apt/sources.list.d/nginx.list
-
For Debian 7
echo "deb http://nginx.org/packages/mainline/debian/ wheezy nginx" \ | sudo tee -a /etc/apt/sources.list.d/nginx.list
echo "deb-src http://nginx.org/packages/mainline/debian/ wheezy nginx" \ | sudo tee -a /etc/apt/sources.list.d/nginx.list
-
For Debian 6
echo "deb http://nginx.org/packages/mainline/debian/ squeeze nginx" \ | sudo tee -a /etc/apt/sources.list.d/nginx.list
echo "deb-src http://nginx.org/packages/mainline/debian/ squeeze nginx" \ | sudo tee -a /etc/apt/sources.list.d/nginx.list
-
-
Add the Signing Key
cd ~
wget http://nginx.org/keys/nginx_signing.key
apt-key add nginx_signing.key
rm nginx_signing.key
-
Next to Achieve SuperUser session
exit