SystemMen - In this article, I will show you how to install the latest Nginx on Debian 8. By default, for Debian 8, you will install Nginx 1.6.x. So if you want to use the latest Nginx version then how? This article will show you how to do it.
Add repository for Nginx
The operating system version I am using is Debian 8.10, its code name is Jessie. By default, Debian 8.x has Nginx 1.6.x support in its repository. But here, I’m talking about wanting to use Nginx latest version.
First, we need to add Nginx’s repository to the server. You open the file /etc/apt/sources.list
and add the following 2 lines of code to the file.
deb http://nginx.org/packages/mainline/debian/ jessie nginx deb-src http://nginx.org/packages/mainline/debian/ jessie nginx
Next, you need to download the Nginx key and add it to the Debian 8 server. To download the key, type the following command.
wget https://nginx.org/keys/nginx_signing.key
Then, you type the following command to add the key to the server.
apt-key add nginx_signing.key
Install the latest Nginx
And now, you can update the new packages.
apt-get update -y
To install latest nginx, you type the following command.
apt-get install nginx -y
You wait for a few minutes to finish installing Nginx.
Check the Nginx version
At this time, Nginx latest mainline version is 1.13.10 as in the image below.
And now, you can check the Nginx version in your server. You type the following command.
nginx -v
With this article, you can install the latest Nginx on Debian 8 easily, no trouble at all. I’ve done successful tests and hopefully you too.
«« How to install MariaDB 10.2 in CentOS 7Nginx redirect a location to another domain »»