-
Notifications
You must be signed in to change notification settings - Fork 29
/
linux_packages.xml
674 lines (544 loc) · 16.2 KB
/
linux_packages.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
<!--
Copyright (C) Nginx, Inc.
-->
<!DOCTYPE article SYSTEM "../../dtd/article.dtd">
<article name="nginx: Linux packages"
link="/en/linux_packages.html"
lang="en"
rev="102">
<section name="Supported distributions and versions" id="distributions">
<para>
nginx packages are available for the following Linux distributions and
versions:
</para>
<para>
<link id="RHEL">RHEL and derivatives</link>
<table note="yes">
<tr>
<td width="30%">Version</td>
<td>Supported Platforms</td>
</tr>
<tr>
<td width="30%">8.x</td>
<td>x86_64, aarch64/arm64</td>
</tr>
<tr>
<td width="30%">9.x</td>
<td>x86_64, aarch64/arm64</td>
</tr>
</table>
</para>
<para>
<link id="Debian">Debian</link>
<table note="yes">
<tr>
<td width="30%">Version</td>
<td>Supported Platforms</td>
</tr>
<tr>
<td width="30%">11.x “bullseye”</td>
<td>x86_64, aarch64/arm64</td>
</tr>
<tr>
<td width="30%">12.x “bookworm”</td>
<td>x86_64, aarch64/arm64</td>
</tr>
</table>
</para>
<para>
<link id="Ubuntu">Ubuntu</link>
<table note="yes">
<tr>
<td width="30%">Version</td>
<td>Supported Platforms</td>
</tr>
<tr>
<td width="30%">20.04 “focal”</td>
<td>x86_64, aarch64/arm64</td>
</tr>
<tr>
<td width="30%">22.04 “jammy”</td>
<td>x86_64, aarch64/arm64</td>
</tr>
<tr>
<td width="30%">24.04 “noble”</td>
<td>x86_64, aarch64/arm64</td>
</tr>
<tr>
<td width="30%">24.10 “oracular”</td>
<td>x86_64, aarch64/arm64</td>
</tr>
</table>
</para>
<para>
<link id="SLES">SLES</link>
<table note="yes">
<tr>
<td width="30%">Version</td>
<td>Supported Platforms</td>
</tr>
<tr>
<td width="30%">15 SP2+</td>
<td>x86_64</td>
</tr>
</table>
</para>
<para>
<link id="Alpine">Alpine</link>
<table note="yes">
<tr>
<td width="30%">Version</td>
<td>Supported platforms</td>
</tr>
<tr>
<td width="30%">3.18</td>
<td>x86_64, aarch64/arm64</td>
</tr>
<tr>
<td width="30%">3.19</td>
<td>x86_64, aarch64/arm64</td>
</tr>
<tr>
<td width="30%">3.20</td>
<td>x86_64, aarch64/arm64</td>
</tr>
</table>
</para>
<para>
<link id="Amazon-Linux">Amazon Linux</link>
<table note="yes">
<tr>
<td width="30%">Version</td>
<td>Supported platforms</td>
</tr>
<tr>
<td width="30%">2 (LTS)</td>
<td>x86_64, aarch64/arm64</td>
</tr>
<tr>
<td width="30%">2023</td>
<td>x86_64, aarch64/arm64</td>
</tr>
</table>
</para>
</section>
<section name="Installation instructions" id="instructions">
<para>
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.
</para>
<section name="RHEL and derivatives" id="RHEL">
<para>
This section applies to Red Hat Enterprise Linux and its derivatives such as
CentOS, Oracle Linux, Rocky Linux, AlmaLinux.
</para>
<para>
Install the prerequisites:
<programlisting>
sudo yum install yum-utils
</programlisting>
To set up the yum repository, create the file named
<path>/etc/yum.repos.d/nginx.repo</path>
with the following contents:
<programlisting>
[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
module_hotfixes=true
[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
module_hotfixes=true
</programlisting>
By default, the repository for stable nginx packages is used.
If you would like to use mainline nginx packages,
run the following command:
<programlisting>
sudo yum-config-manager --enable nginx-mainline
</programlisting>
To install nginx, run the following command:
<programlisting>
sudo yum install nginx
</programlisting>
When prompted to accept the GPG key, verify that the fingerprint matches
<command>573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62</command>,
and if so, accept it.
</para>
</section>
<section name="Debian" id="Debian">
<para>
Install the prerequisites:
<programlisting>
sudo apt install curl gnupg2 ca-certificates lsb-release debian-archive-keyring
</programlisting>
</para>
<para>
Import an official nginx signing key so apt could verify the packages
authenticity.
Fetch the key:
<programlisting>
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \
| sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
</programlisting>
Verify that the downloaded file contains the proper key:
<programlisting>
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
</programlisting>
The output should contain the full fingerprint
<command>573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62</command>
as follows:
<programlisting>
pub rsa2048 2011-08-19 [SC] [expires: 2027-05-24]
573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
uid nginx signing key <[email protected]>
</programlisting>
Note that the output can contain other keys used to sign the packages.
</para>
<para>
To set up the apt repository for stable nginx packages,
run the following command:
<programlisting>
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
http://nginx.org/packages/debian `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list
</programlisting>
If you would like to use mainline nginx packages,
run the following command instead:
<programlisting>
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list
</programlisting>
</para>
<para>
Set up repository pinning to prefer our packages over
distribution-provided ones:
<programlisting>
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \
| sudo tee /etc/apt/preferences.d/99nginx
</programlisting>
</para>
<para>
To install nginx, run the following commands:
<programlisting>
sudo apt update
sudo apt install nginx
</programlisting>
</para>
</section>
<section name="Ubuntu" id="Ubuntu">
<para>
Install the prerequisites:
<programlisting>
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring
</programlisting>
</para>
<para>
Import an official nginx signing key so apt could verify the packages
authenticity.
Fetch the key:
<programlisting>
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \
| sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
</programlisting>
Verify that the downloaded file contains the proper key:
<programlisting>
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
</programlisting>
The output should contain the full fingerprint
<command>573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62</command>
as follows:
<programlisting>
pub rsa2048 2011-08-19 [SC] [expires: 2027-05-24]
573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
uid nginx signing key <[email protected]>
</programlisting>
Note that the output can contain other keys used to sign the packages.
</para>
<para>
To set up the apt repository for stable nginx packages,
run the following command:
<programlisting>
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list
</programlisting>
If you would like to use mainline nginx packages,
run the following command instead:
<programlisting>
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list
</programlisting>
</para>
<para>
Set up repository pinning to prefer our packages over
distribution-provided ones:
<programlisting>
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \
| sudo tee /etc/apt/preferences.d/99nginx
</programlisting>
</para>
<para>
To install nginx, run the following commands:
<programlisting>
sudo apt update
sudo apt install nginx
</programlisting>
</para>
</section>
<section name="SLES" id="SLES">
<para>
Install the prerequisites:
<programlisting>
sudo zypper install curl ca-certificates gpg2
</programlisting>
To set up the zypper repository for stable nginx packages,
run the following command:
<programlisting>
sudo zypper addrepo --gpgcheck --type yum --refresh --check \
'http://nginx.org/packages/sles/$releasever_major' nginx-stable
</programlisting>
If you would like to use mainline nginx packages,
run the following command instead:
<programlisting>
sudo zypper addrepo --gpgcheck --type yum --refresh --check \
'http://nginx.org/packages/mainline/sles/$releasever_major' nginx-mainline
</programlisting>
Next, import an official nginx signing key so zypper/rpm could verify
the packages authenticity.
Fetch the key:
<programlisting>
curl -o /tmp/nginx_signing.key https://nginx.org/keys/nginx_signing.key
</programlisting>
Verify that the downloaded file contains the proper key:
<programlisting>
gpg --with-fingerprint /tmp/nginx_signing.key
</programlisting>
The output should contain the full fingerprint
<command>573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62</command>
as follows:
<programlisting>
pub 2048R/7BD9BF62 2011-08-19 [expires: 2027-05-24]
Key fingerprint = 573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62
uid nginx signing key <[email protected]>
</programlisting>
Finally, import the key to the rpm database:
<programlisting>
sudo rpmkeys --import /tmp/nginx_signing.key
</programlisting>
To install nginx, run the following command:
<programlisting>
sudo zypper install nginx
</programlisting>
</para>
</section>
<section name="Alpine" id="Alpine">
<para>
Install the prerequisites:
<programlisting>
sudo apk add openssl curl ca-certificates
</programlisting>
To set up the apk repository for stable nginx packages,
run the following command:
<programlisting>
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
</programlisting>
If you would like to use mainline nginx packages,
run the following command instead:
<programlisting>
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
</programlisting>
Next, import an official nginx signing key so apk could verify
the packages authenticity.
Fetch the key:
<programlisting>
curl -o /tmp/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub
</programlisting>
Verify that downloaded file contains the proper key:
<programlisting>
openssl rsa -pubin -in /tmp/nginx_signing.rsa.pub -text -noout
</programlisting>
The output should contain the following modulus:
<programlisting>
Public-Key: (2048 bit)
Modulus:
00:fe:14:f6:0a:1a:b8:86:19:fe:cd:ab:02:9f:58:
2f:37:70:15:74:d6:06:9b:81:55:90:99:96:cc:70:
5c:de:5b:e8:4c:b2:0c:47:5b:a8:a2:98:3d:11:b1:
f6:7d:a0:46:df:24:23:c6:d0:24:52:67:ba:69:ab:
9a:4a:6a:66:2c:db:e1:09:f1:0d:b2:b0:e1:47:1f:
0a:46:ac:0d:82:f3:3c:8d:02:ce:08:43:19:d9:64:
86:c4:4e:07:12:c0:5b:43:ba:7d:17:8a:a3:f0:3d:
98:32:b9:75:66:f4:f0:1b:2d:94:5b:7c:1c:e6:f3:
04:7f:dd:25:b2:82:a6:41:04:b7:50:93:94:c4:7c:
34:7e:12:7c:bf:33:54:55:47:8c:42:94:40:8e:34:
5f:54:04:1d:9e:8c:57:48:d4:b0:f8:e4:03:db:3f:
68:6c:37:fa:62:14:1c:94:d6:de:f2:2b:68:29:17:
24:6d:f7:b5:b3:18:79:fd:31:5e:7f:4c:be:c0:99:
13:cc:e2:97:2b:dc:96:9c:9a:d0:a7:c5:77:82:67:
c9:cb:a9:e7:68:4a:e1:c5:ba:1c:32:0e:79:40:6e:
ef:08:d7:a3:b9:5d:1a:df:ce:1a:c7:44:91:4c:d4:
99:c8:88:69:b3:66:2e:b3:06:f1:f4:22:d7:f2:5f:
ab:6d
Exponent: 65537 (0x10001)
</programlisting>
Finally, move the key to apk trusted keys storage:
<programlisting>
sudo mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/
</programlisting>
To install nginx, run the following command:
<programlisting>
sudo apk add nginx@nginx
</programlisting>
The <literal>@nginx</literal> tag should also be specified when installing
packages with <link url="#dynmodules">dynamic modules</link>:
<programlisting>
sudo apk add nginx-module-image-filter@nginx nginx-module-njs@nginx
</programlisting>
</para>
</section>
<section name="Amazon Linux" id="Amazon-Linux">
<para>
Install the prerequisites:
<programlisting>
sudo yum install yum-utils
</programlisting>
To set up the yum repository for Amazon Linux 2, create the file named
<path>/etc/yum.repos.d/nginx.repo</path>
with the following contents:
<programlisting>
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/amzn2/$releasever/$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/amzn2/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
priority=9
</programlisting>
To set up the yum repository for Amazon Linux 2023, create the file named
<path>/etc/yum.repos.d/nginx.repo</path>
with the following contents:
<programlisting>
[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/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
priority=9
</programlisting>
By default, the repository for stable nginx packages is used.
If you would like to use mainline nginx packages,
run the following command:
<programlisting>
sudo yum-config-manager --enable nginx-mainline
</programlisting>
To install nginx, run the following command:
<programlisting>
sudo yum install nginx
</programlisting>
When prompted to accept the GPG key, verify that the fingerprint matches
<command>573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62</command>,
and if so, accept it.
</para>
</section>
</section>
<section name="Source Packages" id="sourcepackages">
<para>
Packaging sources can be found in the
<link url="http://hg.nginx.org/pkg-oss">packaging sources repository</link>.
</para>
<para>
The <literal>default</literal> branch holds packaging sources for the current
mainline version, while <literal>stable-*</literal> branches contain latest
sources for stable releases.
To build binary packages, run <command>make</command> in
<path>debian/</path> directory on Debian/Ubuntu, or in
<path>rpm/SPECS/</path> on RHEL and derivatives, SLES, and Amazon Linux, or in
<path>alpine/</path> on Alpine.
</para>
<para>
Packaging sources are distributed under the same
<link url="../LICENSE">2-clause BSD-like license</link>
used by nginx.
</para>
</section>
<section name="Dynamic Modules" id="dynmodules">
<para>
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
<link doc="docs/ngx_core_module.xml" id="load_module">dynamic modules</link>
and the following modules are built as dynamic and shipped as separate
packages:
<programlisting>
nginx-module-geoip
nginx-module-image-filter
nginx-module-njs
nginx-module-perl
nginx-module-xslt
</programlisting>
Additionally, since version 1.25.3, the following module is shipped as a
separate package:
<programlisting>
nginx-module-otel
</programlisting>
</para>
</section>
<section name="Signatures" id="signatures">
<para>
Since our <link doc="../en/pgp_keys.xml">PGP keys</link>
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
<link url="https://www.gnupg.org/howtos/en/GPGMiniHowto-1.html">
GPG Mini Howto</link>.
Our keys have enough signatures,
and their authenticity is relatively easy to check.
</para>
</section>
</article>