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.
- 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
- 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
- Import Nginx’s official key to verify the downloaded packages.
$ curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
- 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 <moc.x1631853888nign@1631853888yek-g1631853888ningi1631853888s1631853888>
- Update your repositories and install Nginx.
$ sudo apt update && sudo apt install nginx -y
- 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.