2

I've got an Ubuntu 14.04 webserver, and I'd like to install a specific major version of Nginx on it. This means that if I install Nginx 1.8, I do not want Ubuntu to upgrade to 1.9 at any point. However, minor version upgrades are OK (1.8.1 to 1.8.2).

I've found the PPA nginx/stable, but isn't someone maintaining a repository where I can choose the actual version to install? This would be similar to the Ubuntu official package, but just a newer major version.

I consider this to be an essential requirement in order to be able to maintain stable environments where (a) I can guarantee a specific version and (b) critical software not suddenly just jumps a major version up and consequently breaks due to e.g. non-compatibility with configuration files.

3

Install the specific version from nginx ppa

sudo apt-get install nginx=1.8.*

And stay there

sudo apt-mark hold nginx=1.8.*

although you could just stick with 'stable' and trust the package maintainers.

sudo -s
nginx=stable # use nginx=development for latest development version
echo "deb http://ppa.launchpad.net/nginx/$nginx/ubuntu lucid main" > /etc/apt/sources.list.d/nginx-$nginx-lucid.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C
apt-get update
apt-get install nginx

how-to-prevent-updating-of-a-specific-package

  • Thanks! The Launchpad PPA does not say anything about version specific packages, does it? I could only see "community", "stable", "mainline" and "nightly". – sbrattla Oct 14 '15 at 14:19
  • stick with stable, which is 1.8 per nginx's site, it doesn't say a specific version cause that could change down the road. – Jacob Evans Oct 14 '15 at 14:21
  • But what happens when 1.9 becomes stable, then I suddenly find myself having a new major version on my systems? – sbrattla Oct 14 '15 at 14:22
  • Are you auto-updating your systems without user intervention? This is the purpose of programs like Ansible, but you you wouldn't update without checking this information first, if you want to ENSURE you don't go to 1.9, use the apt-mark function. – Jacob Evans Oct 14 '15 at 14:24
  • 1
    It describes version differences. I tried "sudo apt-get install nginx-1.8*", which does not work by the way? – sbrattla Oct 14 '15 at 14:30
0

If you want to install a version of Nginx (or any tools/apps) different than the one in the official repsoitory the best way is to download the tarball and self-compilation.

I don't think this the best place to ask if any of launchpad repo is maintained or not. Best is to ask this question to the repository owners and they will tell you if either maintained regularly or not.

However, it not a rocket science, so just compile it yourself from source.

  • Yes, I know this is an option but to be honest if there is a ready made repository which offers me what I need then I'd be happy to go with that :-) – sbrattla Oct 14 '15 at 14:20

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.