8.1 debian on nginx of version latest the install to How
I am going to show you how to install the latest version of Nginx web server on debian 8.1
1. check if already a version exists
2. i recommend to remove the current installed version to prevent errors. Be sure to make backup of your config in other places.
apt-get remove nginx nginx-common # Removes all but config files.
apt-get purge nginx nginx-common # Removes everything
apt-get autoremove # After using any of the above commands, use this in order to remove dependencies used by nginx which are no longer required.
3. to install new version run the commands below to download Nginx repository authentication key
cd /tmp/ && wget http://nginx.org/keys/nginx_signing.key
4. run also the commands below to install the repository key
apt-key add nginx_signing.key
5. to install the repository key, open the source list
6. copy and paste the lines below into the file and save it
deb http://nginx.org/packages/mainline/debian/ jessie nginx
deb-src http://nginx.org/packages/mainline/debian/ jessie nginx
7. to be sure which version you going to install run following command
apt-get -s install nginx
8. finally, run the commands below to install Nginx
apt-get update && sudo apt-get install nginx
9. check which version you have installed
That’s it! This is how you install the latest version of Nginx on debian 8.1 Jessie. This tutorial also applies to earlier version of debian. It may apply to future version of debian if Nginx repositories don’t change.
Have fun:) Enjoy!