I have a linode server with virtualmin that hosts several of my domains. I am trying to find a guide on how to upgrade to latest stable nginx on Ubuntu 18 but the only article i found in medium said as a first step to Install the dependencies

$ sudo apt-get install software-properties-common python-software-properties 

BUT a get a message

$ sudo apt-get install software-properties-common python-software-properties sh: 1: $: not found $ apt-get install software-properties-common python-software-properties sh: 1: $: not found 

The rest of the guide sugest the following but i am not surewhat to do since the first step is not working

Add the repository for the stable version of Nginx

$ sudo add-apt-repository ppa:nginx/stable 

Now update it

$ sudo apt-get update 

Run install

$ sudo apt-get install nginx When it asks you if you want to keep using the old config or get the new config like this. Configuration file '/etc/nginx/nginx.conf' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** nginx.conf (Y/I/N/O/D/Z) [default=N] ? Select N(No). It will Install the new version of the current config files in /etc/nginx/sites-available directory. 

1 Answer

I'm not sure where you are getting your instructions from but the first step you are failing at is not part of the official instructions posted at

$ sudo wget $ sudo apt-key add nginx_signing.key $ sudo vi /etc/apt/sources.list deb bionic nginx deb-src bionic nginx $ sudo apt-get remove nginx-common $ sudo apt-get update $ sudo apt-get install nginx 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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