Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Debian 8 - Install Nginx

Related Posts

Local Packages

You can just install nginx from the defualt sources like so:

sudo apt-get install nginx-full

This will result in nginx version 1.6.2.

Install Later Version From Dotdeb

If you need a later version of Nginx, you can run this script to install from the Dotdeb sources.

# Add the sources
sudo echo "
deb http://packages.dotdeb.org jessie all
deb http://nginx.org/packages/mainline/debian/ jessie nginx" | sudo tee -a /etc/apt/sources.list

# Add the keys to our system so we trust packages from the sources we added
cd /tmp
wget http://www.dotdeb.org/dotdeb.gpg
sudo apt-key add dotdeb.gpg

wget http://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key

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

You will now have nginx version 1.12.2

Last updated: 2nd September 2018
First published: 29th August 2018