How To Install nginx-light on Ubuntu 20.04

In this tutorial we learn how to install nginx-light on Ubuntu 20.04. nginx-light is nginx web/proxy server (basic version) nginx web/proxy server (basic version)

Introduction

In this tutorial we learn how to install nginx-light on Ubuntu 20.04.

What is nginx-light

nginx-light is:

Nginx (“engine X”) is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web server and as a proxy to reduce the load on back-end HTTP or mail servers.

This package provides a very light version of nginx with only the minimal set of features and modules.

STANDARD HTTP MODULES: Core, Access, Auth Basic, Auto Index, Empty GIF, FastCGI, Map, Proxy, Rewrite, SCGI, uWSGI.

OPTIONAL HTTP MODULES: Auth Request, Charset, Gzip, Gzip Precompression, Headers, HTTP/2, Index, Log, Real IP, Slice, SSI, SSL, Stub Status, Thread Pool, WebDAV, Upstream.

THIRD PARTY MODULES: Echo.

Package: nginx-light Architecture: amd64 Version: 1.17.10-0ubuntu1 Priority: optional Section: universe/httpd Source: nginx Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian Nginx Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1157 Provides: httpd, httpd-cgi, nginx Depends: libnginx-mod-http-echo (= 1.17.10-0ubuntu1), nginx-common (= 1.17.10-0ubuntu1), iproute2, libc6 (>= 2.28), libcrypt1 (>= 1:4.1.0), libpcre3, libssl1.1 (>= 1.1.1), zlib1g (>= 1:1.1.4) Suggests: nginx-doc (= 1.17.10-0ubuntu1) Conflicts: nginx-core, nginx-extras, nginx-full Breaks: nginx (« 1.4.5-1) Filename: pool/universe/n/nginx/nginx-light_1.17.10-0ubuntu1_amd64.deb Size: 402260 MD5sum: ef9a2a48a798018e619bb5193598823f SHA1: c45d1f5733892c5404ffb27b0463f91a96d1c563 SHA256: 6d50c152163c5fb45625c71fb568f49043ee17ec87c90b405c2a20e1a058f726 Homepage: http://nginx.net Description-en: nginx web/proxy server (basic version) Nginx (“engine X”) is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web server and as a proxy to reduce the load on back-end HTTP or mail servers.

This package provides a very light version of nginx with only the minimal set of features and modules.

STANDARD HTTP MODULES: Core, Access, Auth Basic, Auto Index, Empty GIF, FastCGI, Map, Proxy, Rewrite, SCGI, uWSGI.

OPTIONAL HTTP MODULES: Auth Request, Charset, Gzip, Gzip Precompression, Headers, HTTP/2, Index, Log, Real IP, Slice, SSI, SSL, Stub Status, Thread Pool, WebDAV, Upstream.

THIRD PARTY MODULES: Echo.

There are three methods to install nginx-light on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install nginx-light Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install nginx-light using apt-get by running the following command:

sudo apt-get -y install nginx-light

Install nginx-light Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install nginx-light using apt by running the following command:

sudo apt -y install nginx-light

Install nginx-light Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install nginx-light using aptitude by running the following command:

sudo aptitude -y install nginx-light

How To Uninstall nginx-light on Ubuntu 20.04

To uninstall only the nginx-light package we can use the following command:

sudo apt-get remove nginx-light

Uninstall nginx-light And Its Dependencies

To uninstall nginx-light and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove nginx-light

Remove nginx-light Configurations and Data

To remove nginx-light configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge nginx-light

Remove nginx-light configuration, data, and all of its dependencies

We can use the following command to remove nginx-light configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge nginx-light

References

Summary

In this tutorial we learn how to install nginx-light package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.