Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Debian 9 - Install Nginx

Related Posts

Native Packages

sudo apt install nginx-full -y

This will install Nginx version 1.10.3.

Sury Repository

For Debian 8, we used the DotDeb repository, but unfortunately, they will not be maintaining Nginx going forward. Luckily it is available at packages.sury.org.

# Install these packages for using https in next steps
sudo apt install ca-certificates apt-transport-https 

# Add sources
wget -q https://packages.sury.org/nginx/apt.gpg -O- | sudo apt-key add -
echo "deb https://packages.sury.org/nginx/ stretch main" | sudo tee /etc/apt/sources.list.d/nginx.list

# Finally install nginx
sudo apt update && sudo apt install nginx-full -y

This will install Nginx version 1.14.0.

References

Last updated: 2nd September 2018
First published: 2nd September 2018