Install latest Nginx on Ubuntu 19.10

Till now, there were no official packages available for Nginx on Ubuntu 19.10 apart from the ones maintained by Canonical itself. These official packages provided an older version of Nginx(1.16.1) as compared to the latest one which is 1.17.6 as of now.

Here’s how you install the latest Nginx release.

  1. Install the prerequisite software first which is required by Nginx to install/function properly. Some of these packages may already be on your system.
    $ sudo apt install curl gnupg2 ca-certificates lsb-release
  2. Add Nginx’s repository to your system.
    $ echo "deb http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
  3. Import Nginx’s official key to verify the downloaded packages.
    $ curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
  4. Verify the downloaded key.
    $ sudo apt-key fingerprint ABF5BD827BD9BF62
    pub   rsa2048 2011-08-19 [SC] [expires: 2024-06-14]
          573B FD6B 3D8F BC64 1079  A6AB ABF5 BD82 7BD9 BF62
    uid   [ unknown] nginx signing key <signing-key@nginx.com>
  5. Update your repositories and install Nginx.
    $ sudo apt update && sudo apt install nginx -y
  6. Check your Nginx version.
    $ nginx -v
    nginx version: nginx/1.17.6

Congratulations! Latest version of Nginx server is now installed on your system. If you have any questions, please ask them in the comments.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.