nginx packages are available for the following Linux distributions and versions:
Version Supported Platforms 7.4+ x86_64, aarch64/arm64 8.x x86_64, aarch64/arm64, s390x 9.x x86_64, aarch64/arm64, s390x
Version Supported Platforms 10.x “buster” x86_64, i386, aarch64/arm64 11.x “bullseye” x86_64, aarch64/arm64
Version Supported Platforms 18.04 “bionic” x86_64, aarch64/arm64 20.04 “focal” x86_64, aarch64/arm64, s390x 21.10 “impish” x86_64, aarch64/arm64 22.04 “jammy” x86_64, aarch64/arm64
Version Supported Platforms 12 SP5+ x86_64 15 SP2+ x86_64
Version Supported platforms 3.13 x86_64, aarch64/arm64 3.14 x86_64, aarch64/arm64 3.15 x86_64, aarch64/arm64 3.16 x86_64, aarch64/arm64
Version Supported platforms 2 (LTS) x86_64, aarch64/arm64
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.
RHEL/CentOS
Install the prerequisites:
To set up the yum repository, create the file named /etc/yum.repos.d/nginx.repo with the following contents:
By default, the repository for stable nginx packages is used. If you would like to use mainline nginx packages, run the following command:
To install nginx, run the following command:
When prompted to accept the GPG key, verify that the fingerprint matches 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62 , and if so, accept it.
Debian
Install the prerequisites:
Import an official nginx signing key so apt could verify the packages authenticity. Fetch the key:
Verify that the downloaded file contains the proper key:
The output should contain the full fingerprint 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 as follows:
If the fingerprint is different, remove the file.
To set up the apt repository for stable nginx packages, run the following command:
If you would like to use mainline nginx packages, run the following command instead:
Set up repository pinning to prefer our packages over distribution-provided ones:
To install nginx, run the following commands:
Ubuntu
Install the prerequisites:
Import an official nginx signing key so apt could verify the packages authenticity. Fetch the key:
Verify that the downloaded file contains the proper key:
The output should contain the full fingerprint 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 as follows:
If the fingerprint is different, remove the file.
To set up the apt repository for stable nginx packages, run the following command:
If you would like to use mainline nginx packages, run the following command instead:
Set up repository pinning to prefer our packages over distribution-provided ones:
To install nginx, run the following commands:
Install the prerequisites:
To set up the zypper repository for stable nginx packages, run the following command:
If you would like to use mainline nginx packages, run the following command instead:
Next, import an official nginx signing key so zypper/rpm could verify the packages authenticity. Fetch the key:
Verify that the downloaded file contains the proper key:
The output should contain the full fingerprint 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62 as follows:
Finally, import the key to the rpm database:
To install nginx, run the following command:
Alpine
Install the prerequisites:
To set up the apk repository for stable nginx packages, run the following command:
If you would like to use mainline nginx packages, run the following command instead:
Next, import an official nginx signing key so apk could verify the packages authenticity. Fetch the key:
Verify that downloaded file contains the proper key:
The output should contain the following modulus:
Finally, move the key to apk trusted keys storage:
To install nginx, run the following command:
The @nginx tag should also be specified when installing packages with dynamic modules:
Amazon Linux
Install the prerequisites:
To set up the yum repository, create the file named /etc/yum.repos.d/nginx.repo with the following contents:
By default, the repository for stable nginx packages is used. If you would like to use mainline nginx packages, run the following command:
To install nginx, run the following command:
When prompted to accept the GPG key, verify that the fingerprint matches 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62 , and if so, accept it.
Source Packages
Packaging sources can be found in the packaging sources repository.
The default branch holds packaging sources for the current mainline version, while stable-* branches contain latest sources for stable releases. To build binary packages, run make in debian/ directory on Debian/Ubuntu, or in rpm/SPECS/ on RHEL/CentOS/SLES/Amazon Linux, or in alpine/ on Alpine.
Packaging sources are distributed under the same 2-clause BSD-like license used by nginx.
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:
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.
Установка последней версии nginx в Linux
Если есть необходимость поставить последнюю версию nginx, то совсем необязательно для этого собирать программу из исходников самому, можно воспользоваться встроенным в дистрибутив менеджером пакетов. Но так, как обычно в официальных репозиториях лежат старые версии программ, то нужно будет провести кое-какие манипуляции.
CentOS/Red Hat Enterprise Linux
Отправляемся в директорию /etc/yum.repos.d и создаем там файл nginx.repo:
и добавляем туда следующее:
В этом тексте необходимо заменить на centos или rhel, в зависимости от используемой ОС, а на номер релиза — 5, 6, 7 и т. д.
Затем нужно обновить индексы пакетов:
и установить через менеджер пакетов:
Debian/Ubuntu
Переходим во временную папку, и скачиваем файл ключа, которым подписаны пакеты nginx:
Тема: Как правильно обновить nginx (CentOS 6.5 x64 + ISPmanager)
Как правильно обновить nginx (CentOS 6.5 x64 + ISPmanager)
Centos 6.5(final) x64 + ISPmanager-Lite 4.4.10.22.
Nginx установлен, однако в "возможностях" менеджера указана устаревшая версия (nginx-1.0.15-5.el6). Подскажите пожалуйста, как грамотнее обновить его до последней версии (1.6).
- Просмотр профиля
- Сообщения форума
- Просмотр профиля
- Сообщения форума
- Просмотр профиля
- Сообщения форума
Тоже думаю обновиться до последней стабильной версии (сейчас: CentOS + ISPm 4 pro + nginx 1.0.15), в связи с чем — вопросы (я в этом не силён):
1) Как Вы считаете, стоит ли обновлять nginx (вообще и описанным выше способом в частности)? Не возникнет ли проблем каких-нибудь, конфликтов?
2) Надо ли предварительно отключить что-нибудь? (что/где/как?)
3) "Исправьте пожалуйста опечатку в коде" — т.е. выделенный красным слэш не нужен?
4) "Даем чуток "ума" панели ))" — что именно делает эта команда / зачем?