0

I am using a cloudserver. I installed Debian 7 (minimal) from the hosting company's image. Logged in as root.

I have added the following to the bottom of my /etc/apt/sources.list

deb http://nginx.org/packages/debian/ wheezy nginx
deb-src http://nginx.org/packages/debian/ wheezy nginx

Then I downloaded the nginx key, and added it to my apt key chain.

I then ran the following commands

apt-get update
apt-get install nginx

The system still installed nginx 1.10.1

I understand this is because Debian has an 'approved' list of packages and the only 'approved' version is 1.10.1

But by adding Nginx to the sources.list and updating my apt-get, I was lead to believe this would allow me to download a more up to date version of nginx.

I have followed 4 seperate tutorials today and haven't been able to get any of them to work.

Can someone please tell me the commands I need to execute to upgrade my nginx to 1.8.0 i would be most grateful. I am trying to install this exact version 1.8.0 as I am working on a development box, and trying to replicate the production enviornment as closely as possible and it's using 1.8.0.

Thanks

  • 1
    Because you selected the nginx repo you have downloaded the latest and greatest stable version (1.10) which is newer than the old 1.8 version. blog.andrewbeacock.com/2007/03/… may help you with how to install specific versions – Stephen Harris Jul 9 '16 at 19:59
0

Thank you to Stephen Harris for providing me this solution. He posted the link to this blog http://blog.andrewbeacock.com/2007/03/how-to-install-specific-version-of.html which had a very simple solution to my problem.

First I ran the following command

apt-cache showpkg <package name>

In this case

apt-cache showpkg nginx

Then I searched the output of this for the version of nginx I was trying to install (1.8.0). It had a specific title in the list, in this case: -

1.8.0-1~wheezy

Then I removed nginx (this wasn't in the instructions but it seemed sensible to do this) I used the following command, I had picked up from my many attempts earlier: -

apt-get purge nginx nginx-common

Then I ran the apt-get install again but this time appended the exact version I had found in the previous step above, like so: -

apt-get install nginx=1.8.0-1~wheezy

I then ran the following command

nginx - v

To verify my installation which was indeed now...

nginx version: nginx/1.8.0

Thanks again to Stephen Harris for sharing the solution originally provided by Andrew

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.