# HG changeset patch # User Konstantin Pavlov # Date 1548842686 -10800 # Node ID bb03e6ac2f165010f33c4920166dd139cc18a895 # Parent 580c3007d242a8806eab6d871c1119caeaf6d037 Added per-distro instructions on how to enable packages signature checks. diff --git a/xml/en/linux_packages.xml b/xml/en/linux_packages.xml --- a/xml/en/linux_packages.xml +++ b/xml/en/linux_packages.xml @@ -7,7 +7,7 @@
@@ -120,175 +120,222 @@ SLES: -To enable automatic updates of Linux packages -set up the yum repository for the RHEL/CentOS distributions, -the apt repository for the Debian/Ubuntu distributions, -or the zypper repository for SLES. +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.
-
+
+ +
-To set up the yum repository for RHEL/CentOS, create the file named +Install the prerequisites: + +sudo yum install yum-utils + + +To set up the yum repository, create the file named /etc/yum.repos.d/nginx.repo with the following contents: -[nginx] -name=nginx repo -baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/ -gpgcheck=0 +[nginx-stable] +name=nginx stable repo +baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ +gpgcheck=1 enabled=1 +gpgkey=https://nginx.org/keys/nginx_signing.key + +[nginx-mainline] +name=nginx mainline repo +baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/ +gpgcheck=1 +enabled=0 +gpgkey=https://nginx.org/keys/nginx_signing.key -Replace “OS” with “rhel” or -“centos”, -depending on the distribution used, and “OSRELEASE” -with “6” or “7”, for 6.x or 7.x versions, -respectively. +By default, the repository for stable nginx packages is used. +If you would like to use mainline nginx packages, run the following command: + +sudo yum-config-manager --enable nginx-mainline + + +To install nginx, run the following command: + +sudo yum install nginx + + +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. - -For Debian/Ubuntu, in order to authenticate the nginx repository signature -and to eliminate warnings about missing PGP key during installation of the -nginx package, it is necessary to add the key used to sign the nginx -packages and repository to the apt program keyring. -Please download this -key from our web site, and add it to the apt -program keyring with the following command: - -sudo apt-key add nginx_signing.key - - +
+ + +
-For Debian replace codename with Debian distribution -codename, and append the following to -the end of the /etc/apt/sources.list file: - +Install the prerequisites: -deb http://nginx.org/packages/debian/ codename nginx -deb-src http://nginx.org/packages/debian/ codename nginx +sudo apt install curl gnupg2 ca-certificates lsb-release - - -For Ubuntu replace codename with Ubuntu distribution -codename, and append the following to -the end of the /etc/apt/sources.list file: +To set up the apt repository for stable nginx packages, +run the following command: + +echo "deb http://nginx.org/packages/debian `lsb_release -cs` nginx" \ + | sudo tee /etc/apt/sources.list.d/nginx.list + +If you would like to use mainline nginx packages, +run the following command instead: -deb http://nginx.org/packages/ubuntu/ codename nginx -deb-src http://nginx.org/packages/ubuntu/ codename nginx +echo "deb http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx" \ + | sudo tee /etc/apt/sources.list.d/nginx.list - - -For Debian/Ubuntu then run the following commands: +Next, import an official nginx signing key so apt could verify the packages +authenticity: -apt-get update -apt-get install nginx +curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - - + +Verify that you now have the proper key: + +sudo apt-key fingerprint ABF5BD827BD9BF62 + - -For SLES 12 run the following command: +The output should contain the full fingerprint +573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62 +as follows: -zypper addrepo -G -t yum -c 'http://nginx.org/packages/sles/12' nginx +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> - - -For SLES 15 run the following command: +To install nginx, run the following commands: -zypper addrepo -G -t yum -c 'http://nginx.org/packages/sles/15' nginx +sudo apt update +sudo apt install nginx
-
+
-To set up the yum repository for RHEL/CentOS, create the file named -/etc/yum.repos.d/nginx.repo -with the following contents: +Install the prerequisites: + +sudo apt install curl gnupg2 ca-certificates lsb-release + +To set up the apt repository for stable nginx packages, +run the following command: -[nginx] -name=nginx repo -baseurl=http://nginx.org/packages/mainline/OS/OSRELEASE/$basearch/ -gpgcheck=0 -enabled=1 +echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \ + | sudo tee /etc/apt/sources.list.d/nginx.list + + +If you would like to use mainline nginx packages, +run the following command instead: + +echo "deb http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \ + | sudo tee /etc/apt/sources.list.d/nginx.list -Replace “OS” with “rhel” or -“centos”, -depending on the distribution used, and “OSRELEASE” -with “6” or “7”, for 6.x or 7.x versions, -respectively. - +Next, import an official nginx signing key so apt could verify the packages +authenticity: + +curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - + + +Verify that you now have the proper key: + +sudo apt-key fingerprint ABF5BD827BD9BF62 + - -For Debian/Ubuntu, in order to authenticate the nginx repository signature -and to eliminate warnings about missing PGP key during installation of the -nginx package, it is necessary to add the key used to sign the nginx -packages and repository to the apt program keyring. -Please download this -key from our web site, and add it to the apt -program keyring with the following command: +The output should contain the full fingerprint +573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62 +as follows: -sudo apt-key add nginx_signing.key +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> + + +To install nginx, run the following commands: + +sudo apt update +sudo apt install nginx - -For Debian replace codename with Debian distribution -codename, and append the following to -the end of the /etc/apt/sources.list file: +
- -deb http://nginx.org/packages/mainline/debian/ codename nginx -deb-src http://nginx.org/packages/mainline/debian/ codename nginx - - + +
-For Ubuntu replace codename with Ubuntu distribution -codename, and append the following to -the end of the /etc/apt/sources.list file: +Install the prerequisites: + +sudo zypper install curl ca-certificates gpg2 + + +To set up the zypper repository for stable nginx packages, +run the following command: + +sudo zypper addrepo --gpgcheck --type yum --refresh --check \ + 'http://nginx.org/packages/sles/$releasever' nginx-stable + + +If you would like to use mainline nginx packages, +run the following command instead: + +sudo zypper addrepo --gpgcheck --type yum --refresh --check \ + 'http://nginx.org/packages/mainline/sles/$releasever' nginx-mainline + +Next, import an official nginx signing key so zypper/rpm could verify +the packages authenticity. +Fetch the key: -deb http://nginx.org/packages/mainline/ubuntu/ codename nginx -deb-src http://nginx.org/packages/mainline/ubuntu/ codename nginx +curl -o /tmp/nginx_signing.key https://nginx.org/keys/nginx_signing.key + + +Verify that the downloaded file contains the proper key: + +gpg --with-fingerprint /tmp/nginx_signing.key + + +The output should contain the full fingerprint +573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62 +as follows: + +pub 2048R/7BD9BF62 2011-08-19 [expires: 2024-06-14] + Key fingerprint = 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62 +uid nginx signing key <signing-key@nginx.com> + + +Finally, import the key to the rpm database: + +sudo rpmkeys --import /tmp/nginx_signing.key + + +To install nginx, run the following command: + +sudo zypper install nginx - -For Debian/Ubuntu then run the following commands: - -apt-get update -apt-get install nginx - - - - -For SLES 12 run the following command: - -zypper addrepo -G -t yum -c 'http://nginx.org/packages/mainline/sles/12' nginx - - - - -For SLES 15 run the following command: - -zypper addrepo -G -t yum -c 'http://nginx.org/packages/mainline/sles/15' nginx - - +
@@ -341,41 +388,6 @@ nginx-module-xslt
-Both RPM packages and Debian/Ubuntu repositories use digital signatures -to verify the integrity and origin of the downloaded package. -In order to check a signature it is necessary to download -nginx signing key -and import it to the rpm or apt -program’s keyring: - - - - -On Debian/Ubuntu: -sudo apt-key add nginx_signing.key - - - -On RHEL/CentOS: -sudo rpm --import nginx_signing.key - - - -On SLES: -sudo rpm --import nginx_signing.key - - - - - - -On Debian/Ubuntu/SLES signatures are checked by default, but -on RHEL/CentOS it is necessary to set -gpgcheck=1 in the -/etc/yum.repos.d/nginx.repo file. - - - Since our PGP keys and packages are located on the same server, they are equally trusted. diff --git a/xml/ru/linux_packages.xml b/xml/ru/linux_packages.xml --- a/xml/ru/linux_packages.xml +++ b/xml/ru/linux_packages.xml @@ -7,7 +7,7 @@
@@ -119,179 +119,220 @@ SLES: -Чтобы включить автоматическое обновление пакетов для Linux, -настройте репозиторий yum для дистрибутивов RHEL/CentOS, -репозиторий apt для дистрибутивов Debian/Ubuntu, -или репозиторий zypper для SLES. +Для того, чтобы поставить nginx на новой машине, необходимо подключить +и настроить репозиторий пакетов nginx. +После этого можно будет установить и обновлять nginx из этого репозитория.
-
- - -Для настройки репозитория yum для RHEL/CentOS необходимо -создать файл с именем /etc/yum.repos.d/nginx.repo -и таким содержимым: - - -[nginx] -name=nginx repo -baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/ -gpgcheck=0 -enabled=1 - +
-Замените “OS” на “rhel” или -“centos”, -в зависимости от используемого дистрибутива, а “OSRELEASE” -на “6” или “7”, для, соответственно, 6.x -или 7.x версий. - - - -Для Debian/Ubuntu, для проверки подлинности подписи репозитория nginx, -и чтобы избавиться от предупреждений об отсутствующем PGP-ключе во время -установки пакета nginx, необходимо добавить ключ, которым были подписаны -пакеты и репозиторий nginx, в связку ключей программы apt. -Загрузите этот -ключ с нашего веб-сайта и добавьте его в связку ключей программы -apt, выполнив команду: - -sudo apt-key add nginx_signing.key - - +
-Для Debian замените codename на -кодовое имя дистрибутива, -и добавьте в конец файла /etc/apt/sources.list -следующее: - +Установите пакеты, необходимые для подключения yum-репозитория: -deb http://nginx.org/packages/debian/ codename nginx -deb-src http://nginx.org/packages/debian/ codename nginx +sudo yum install yum-utils - - -Для Ubuntu замените codename на -кодовое имя дистрибутива, -и добавьте в конец файла /etc/apt/sources.list -следующее: +Для подключения yum-репозитория создайте файл с именем +/etc/yum.repos.d/nginx.repo +со следующим содержимым: -deb http://nginx.org/packages/ubuntu/ codename nginx -deb-src http://nginx.org/packages/ubuntu/ codename nginx +[nginx-stable] +name=nginx stable repo +baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ +gpgcheck=1 +enabled=1 +gpgkey=https://nginx.org/keys/nginx_signing.key + +[nginx-mainline] +name=nginx mainline repo +baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/ +gpgcheck=1 +enabled=0 +gpgkey=https://nginx.org/keys/nginx_signing.key + +По умолчанию используется репозиторий для стабильной версии nginx. +Если предпочтительно использовать пакеты для основной версии nginx, +выполните следующую команду: + +sudo yum-config-manager --enable nginx-mainline + + +Чтобы установить nginx, выполните следующую команду: + +sudo yum install nginx + + +При запросе подтверждения GPG-ключа проверьте, что отпечаток ключа совпадает +с 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62, и, +если это так, подтвердите его. +
+ + +
+ -Для Debian/Ubuntu затем выполните команды: +Установите пакеты, необходимые для подключения apt-репозитория: + +sudo apt install curl gnupg2 ca-certificates lsb-release + + +Для подключения apt-репозитория для стабильной версии nginx, +выполните следующую команду: -apt-get update -apt-get install nginx +echo "deb http://nginx.org/packages/debian `lsb_release -cs` nginx" \ + | sudo tee /etc/apt/sources.list.d/nginx.list - + +Если предпочтительно использовать пакеты для основной версии nginx, +выполните следующую команду вместо предыдущей: + +echo "deb http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx" \ + | sudo tee /etc/apt/sources.list.d/nginx.list + - -Для SLES 12 выполните команду: +Теперь нужно импортировать официальный ключ, +используемый apt для проверки подлинности пакетов: -zypper addrepo -G -t yum -c 'http://nginx.org/packages/sles/12' nginx +curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - + + +Проверьте, верный ли ключ был импортирован: + +sudo apt-key fingerprint ABF5BD827BD9BF62 - - -Для SLES 15 выполните команду: +Вывод команды должен содержать полный отпечаток ключа +573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62: -zypper addrepo -G -t yum -c 'http://nginx.org/packages/sles/15' nginx +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> + + +Чтобы установить nginx, выполните следующие команды: + +sudo apt update +sudo apt install nginx
-
+
-Для настройки репозитория yum для RHEL/CentOS необходимо -создать файл с именем /etc/yum.repos.d/nginx.repo -и таким содержимым: +Установите пакеты, необходимые для подключения apt-репозитория: + +sudo apt install curl gnupg2 ca-certificates lsb-release + +Для подключения apt-репозитория для стабильной версии nginx, +выполните следующую команду: -[nginx] -name=nginx repo -baseurl=http://nginx.org/packages/mainline/OS/OSRELEASE/$basearch/ -gpgcheck=0 -enabled=1 +echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \ + | sudo tee /etc/apt/sources.list.d/nginx.list + + +Если предпочтительно использовать пакеты для основной версии nginx, +выполните следующую команду вместо предыдущей: + +echo "deb http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \ + | sudo tee /etc/apt/sources.list.d/nginx.list -Замените “OS” на “rhel” или -“centos”, -в зависимости от используемого дистрибутива, а “OSRELEASE” -на “6” или “7”, для, соответственно, 6.x -или 7.x версий. - +Теперь нужно импортировать официальный ключ, используемый apt для проверки +подлинности пакетов: + +curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - + + +Проверьте, верный ли ключ был импортирован: + +sudo apt-key fingerprint ABF5BD827BD9BF62 + - -Для Debian/Ubuntu, для проверки подлинности подписи репозитория nginx, -и чтобы избавиться от предупреждений об отсутствующем PGP-ключе во время -установки пакета nginx, необходимо добавить ключ, которым были подписаны -пакеты и репозиторий nginx, в связку ключей программы apt. -Загрузите этот -ключ с нашего веб-сайта и добавьте его в связку ключей программы -apt, выполнив команду: +Вывод команды должен содержать полный отпечаток ключа +573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62: -sudo apt-key add nginx_signing.key +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> + + +Чтобы установить nginx, выполните следующие команды: + +sudo apt update +sudo apt install nginx +
+ + +
+ -Для Debian замените codename на -кодовое имя дистрибутива, -и добавьте в конец файла /etc/apt/sources.list -следующее: +Установите пакеты, необходимые для подключения zypper-репозитория: + +sudo zypper install curl ca-certificates gpg2 + + +Для подключения zypper-репозитория для стабильной версии nginx, +выполните следующую команду: + +sudo zypper addrepo --gpgcheck --type yum --refresh --check \ + 'http://nginx.org/packages/sles/$releasever' nginx-stable + + +Если предпочтительно использовать пакеты для основной версии nginx, +выполните следующую команду вместо предыдущей: + +sudo zypper addrepo --gpgcheck --type yum --refresh --check \ + 'http://nginx.org/packages/mainline/sles/$releasever' nginx-mainline + +Теперь нужно импортировать официальный ключ, используемый zypper/rpm +для проверки подлинности пакетов. +Скачайте ключ: -deb http://nginx.org/packages/mainline/debian/ codename nginx -deb-src http://nginx.org/packages/mainline/debian/ codename nginx +curl -o /tmp/nginx_signing.key https://nginx.org/keys/nginx_signing.key + + +Проверьте, верный ли ключ был загружен: + +gpg --with-fingerprint /tmp/nginx_signing.key + + +Вывод команды должен содержать полный отпечаток ключа +573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62: + +pub 2048R/7BD9BF62 2011-08-19 [expires: 2024-06-14] + Key fingerprint = 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62 +uid nginx signing key <signing-key@nginx.com> + + +Импортируйте ключ в базу данных rpm: + +sudo rpmkeys --import /tmp/nginx_signing.key + + +Чтобы установить nginx, выполните следующую команду: + +sudo zypper install nginx - -Для Ubuntu замените codename на -кодовое имя дистрибутива, -и добавьте в конец файла /etc/apt/sources.list -следующее: - - -deb http://nginx.org/packages/mainline/ubuntu/ codename nginx -deb-src http://nginx.org/packages/mainline/ubuntu/ codename nginx - - - - -Для Debian/Ubuntu затем выполните команды: - -apt-get update -apt-get install nginx - - - - -Для SLES 12 выполните команду: - -zypper addrepo -G -t yum -c 'http://nginx.org/packages/mainline/sles/12' nginx - - - - -Для SLES 15 выполните команду: - -zypper addrepo -G -t yum -c 'http://nginx.org/packages/mainline/sles/15' nginx - - +
@@ -345,42 +386,6 @@ nginx-module-xslt
-Для проверки целостности и происхождения загруженного пакета -и в случае RPM, и в случае репозиториев Debian/Ubuntu используется -цифровая подпись. -Для проверки подписи необходимо загрузить -этот ключ -и импортировать его в связку ключей программы rpm -или apt: - - - - -Для Debian/Ubuntu: -sudo apt-key add nginx_signing.key - - - -Для RHEL/CentOS: -sudo rpm --import nginx_signing.key - - - -Для SLES: -sudo rpm --import nginx_signing.key - - - - - - -В Debian/Ubuntu/SLES подпись проверяется по умолчанию, однако -в RHEL/CentOS необходимо добавить -gpgcheck=1 в файл -/etc/yum.repos.d/nginx.repo. - - - Поскольку наши PGP-ключи находятся на том же сервере, что и пакеты, им следует доверять в равной степени.