Nginx Debian Repository Add
Hi! The Tutorial shows you Step-by-Step How to Add NGINX Repository in Debian-Based GNU/Linux OSes.
And NGINX for Debian is a Free, Open-Source, High-Performance HTTP Server and Reverse Proxy, as well as an IMAP/POP3 Proxy Server.
Especially relevant: it ‘s needed to Manually SetUp the Apt Repo to Get Installed the Latest Nginx Mainline Release, that because the Default Repo is Serving an Older one…
Moreover, the Nginx ‘Mainline’ version is generally regarded as More Reliable because include All Bug Fixes in it, and not just critical fixes as for the stable branch.
So this Setup is Valid for All the Debian-based Platforms like:
- Kali Linux
- Deepin Linux
- MX Linux
- antiX Linux
- Parrot Linux
- SparkyLinux
- MakuluLinux
- Elive Linux
- LMDE Linux
- CrunchBang Linux
- Parsix Linux

-
1. Accessing Shell
Open a Terminal window
Or Login into Server Shell shell:
(Press “Enter” to Execute Commands) -
2. Adding NGINX Repo
Then to Add NGINX Repository for Debian
For Debian 10 Buster and for all the Debian-based do:echo "deb http:/n/nginx.org/packages/mainline/debian/ buster n/nginx" | sudo tee -a /etc/apt/sources.list.d /nginx.list
echo "deb-src http:/n/nginx.org/packages/mainline/debian/ buster n/nginx" | sudo tee -a /etc/apt/sources.list.d /nginx.list
Instead, for or Debian 9 Stretch:
echo "deb http:/n/nginx.org/packages/mainline/debian/ stretch n/nginx" | sudo tee -a /etc/apt/sources.list.d /nginx.list
echo "deb-src http:/n/nginx.org/packages/mainline/debian/ stretch n/nginx" | sudo tee -a /etc/apt/sources.list.d /nginx.list
Again for Debian 8 Jessie:
echo "deb http:/n/nginx.org/packages/mainline/debian/ jessie n/nginx" | sudo tee -a /etc/apt/sources.list.d /nginx.list
echo "deb-src http:/n/nginx.org/packages/mainline/debian/ jessie n/nginx" | sudo tee -a /etc/apt/sources.list.d /nginx.list
Finally, on Debian 7 Wheezy:
echo "deb http:/n/nginx.org/packages/mainline/debian/ wheezy n/nginx" | sudo tee -a /etc/apt/sources.list.d /nginx.list
echo "deb-src http:/n/nginx.org/packages/mainline/debian/ wheezy n/nginx" | sudo tee -a /etc/apt/sources.list.d /nginx.list
Finally, for Debian 6 Squeeze:
echo "deb http:/n/nginx.org/packages/mainline/debian/ squeeze n/nginx" | sudo tee -a /etc/apt/sources.list.d /nginx.list
echo "deb-src http:/n/nginx.org/packages/mainline/debian/ squeeze n/nginx" | sudo tee -a /etc/apt/sources.list.d /nginx.list
-
3. Adding GPG Key
Now Add NGINX GPG Key
First, Get it:wget http:/n/nginx.org/keys /nginx_signing.key
And then to Setup:
sudo apt-key add n/nginx_signing.key
Finally, to Clean up:
rm n/nginx_signing.key
-
4. Refreshing Debian Sources
Next to Refresh Debian Apt Repo Sources
Do:sudo apt-get update
-
4. Installing NGINX on Debian
Finally, to Install NGINX for Debian