Nginx - Linux Packages
Nginx - Linux Packages
Debian
Ubuntu
SLES
Amazon Linux
Installation instructions
Before you install nginx for the first time on a new machine,
you need to set up the nginx packages repository. Afterward,
you can install and update nginx from the repository.
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basear
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releaseve
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module hotfixes=true
Debian
Install the prerequisites:
Note that the output can contain other keys used to sign the
packages.
To set up the apt repository for stable nginx packages, run the
following command:
Ubuntu
Install the prerequisites:
Note that the output can contain other keys used to sign the
packages.
To set up the apt repository for stable nginx packages, run the
following command:
SLES
Install the prerequisites:
The output should contain the full fingerprint 573B FD6B 3D8F
BC64 1079 A6AB ABF5 BD82 7BD9 BF62 as follows:
Alpine
Install the prerequisites:
printf "%s%s%s%s\n" \
"@nginx " \
"http://nginx.org/packages/alpine/v" \
`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` \
"/main" \
| sudo tee -a /etc/apk/repositories
printf "%s%s%s%s\n" \
"@nginx " \
"http://nginx.org/packages/mainline/alpine/v" \
`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` \
"/main" \
| sudo tee -a /etc/apk/repositories
Amazon Linux
Install the prerequisites:
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/amzn2/$releasever/$basearc
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
priority=9
[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/amzn2/$releasever
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
priority=9
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/amzn/2023/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
priority=9
[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/amzn/2023/$basear
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
priority=9
Source Packages
Packaging sources can be found in the packaging sources
repository.
Dynamic Modules
Main nginx package is built with all modules that do not
require additional libraries to avoid extra dependencies. Since
version 1.9.11, nginx supports dynamic modules and the
following modules are built as dynamic and shipped as
separate packages:
nginx-module-geoip
nginx-module-image-filter
nginx-module-njs
nginx-module-perl
nginx-module-xslt
nginx-module-otel
Signatures
Since our PGP keys and packages are located on the same
server, they are equally trusted. It is highly advised to
additionally verify the authenticity of the downloaded PGP
key. PGP has the “Web of Trust” concept, when a key is
signed by someone else’s key, that in turn is signed by
another key and so on. It often makes possible to build a
chain from an arbitrary key to someone’s key who you know
and trust personally, thus verify the authenticity of the first key
in a chain. This concept is described in details in GPG Mini
Howto. Our keys have enough signatures, and their
authenticity is relatively easy to check.