Mercurial > hg > nginx-site
comparison xml/en/linux_packages.xml @ 2755:6eff5d63925b
Linux packages: updated Debian and Ubuntu to best practices.
While at it, added paragraphs to properly split logical sections.
author | Konstantin Pavlov <thresh@nginx.com> |
---|---|
date | Wed, 11 Aug 2021 13:35:03 +0300 |
parents | 3975b5ffd38e |
children | 7898e090ad72 |
comparison
equal
deleted
inserted
replaced
2754:3975b5ffd38e | 2755:6eff5d63925b |
---|---|
5 <!DOCTYPE article SYSTEM "../../dtd/article.dtd"> | 5 <!DOCTYPE article SYSTEM "../../dtd/article.dtd"> |
6 | 6 |
7 <article name="nginx: Linux packages" | 7 <article name="nginx: Linux packages" |
8 link="/en/linux_packages.html" | 8 link="/en/linux_packages.html" |
9 lang="en" | 9 lang="en" |
10 rev="64"> | 10 rev="65"> |
11 | 11 |
12 <section name="Supported distributions and versions" id="distributions"> | 12 <section name="Supported distributions and versions" id="distributions"> |
13 | 13 |
14 <para> | 14 <para> |
15 nginx packages are available for the following Linux distributions and | 15 nginx packages are available for the following Linux distributions and |
199 gpgkey=https://nginx.org/keys/nginx_signing.key | 199 gpgkey=https://nginx.org/keys/nginx_signing.key |
200 module_hotfixes=true | 200 module_hotfixes=true |
201 </programlisting> | 201 </programlisting> |
202 | 202 |
203 By default, the repository for stable nginx packages is used. | 203 By default, the repository for stable nginx packages is used. |
204 If you would like to use mainline nginx packages, run the following command: | 204 If you would like to use mainline nginx packages, |
205 run the following command: | |
205 <programlisting> | 206 <programlisting> |
206 sudo yum-config-manager --enable nginx-mainline | 207 sudo yum-config-manager --enable nginx-mainline |
207 </programlisting> | 208 </programlisting> |
208 | 209 |
209 To install nginx, run the following command: | 210 To install nginx, run the following command: |
222 <section name="Debian" id="Debian"> | 223 <section name="Debian" id="Debian"> |
223 | 224 |
224 <para> | 225 <para> |
225 Install the prerequisites: | 226 Install the prerequisites: |
226 <programlisting> | 227 <programlisting> |
227 sudo apt install curl gnupg2 ca-certificates lsb-release | 228 sudo apt install curl gnupg2 ca-certificates lsb-release debian-archive-keyring |
228 </programlisting> | 229 </programlisting> |
229 | 230 </para> |
230 To set up the apt repository for stable nginx packages, | 231 |
231 run the following command: | 232 <para> |
232 <programlisting> | 233 Import an official nginx signing key so apt could verify the packages |
233 echo "deb http://nginx.org/packages/debian `lsb_release -cs` nginx" \ | |
234 | sudo tee /etc/apt/sources.list.d/nginx.list | |
235 </programlisting> | |
236 | |
237 If you would like to use mainline nginx packages, | |
238 run the following command instead: | |
239 <programlisting> | |
240 echo "deb http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx" \ | |
241 | sudo tee /etc/apt/sources.list.d/nginx.list | |
242 </programlisting> | |
243 | |
244 Set up repository pinning to prefer our packages over | |
245 distribution-provided ones: | |
246 <programlisting> | |
247 echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \ | |
248 | sudo tee /etc/apt/preferences.d/99nginx | |
249 </programlisting> | |
250 | |
251 Next, import an official nginx signing key so apt could verify the packages | |
252 authenticity. | 234 authenticity. |
253 Fetch the key: | 235 Fetch the key: |
254 <programlisting> | 236 <programlisting> |
255 curl -o /tmp/nginx_signing.key https://nginx.org/keys/nginx_signing.key | 237 curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \ |
238 | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null | |
256 </programlisting> | 239 </programlisting> |
257 | 240 |
258 Verify that the downloaded file contains the proper key: | 241 Verify that the downloaded file contains the proper key: |
259 <programlisting> | 242 <programlisting> |
260 gpg --dry-run --quiet --import --import-options import-show /tmp/nginx_signing.key | 243 gpg --dry-run --quiet --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg |
261 </programlisting> | 244 </programlisting> |
262 | 245 |
263 The output should contain the full fingerprint | 246 The output should contain the full fingerprint |
264 <command>573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62</command> | 247 <command>573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62</command> |
265 as follows: | 248 as follows: |
266 <programlisting> | 249 <programlisting> |
267 pub rsa2048 2011-08-19 [SC] [expires: 2024-06-14] | 250 pub rsa2048 2011-08-19 [SC] [expires: 2024-06-14] |
268 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 | 251 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 |
269 uid nginx signing key <signing-key@nginx.com> | 252 uid nginx signing key <signing-key@nginx.com> |
270 </programlisting> | 253 </programlisting> |
271 | 254 If the fingerprint is different, remove the file. |
272 Finally, move the key to apt trusted key storage (note the "asc" file extension change): | 255 </para> |
273 <programlisting> | 256 |
274 sudo mv /tmp/nginx_signing.key /etc/apt/trusted.gpg.d/nginx_signing.asc | 257 <para> |
275 </programlisting> | 258 To set up the apt repository for stable nginx packages, |
276 | 259 run the following command: |
260 <programlisting> | |
261 echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ | |
262 http://nginx.org/packages/debian `lsb_release -cs` nginx" \ | |
263 | sudo tee /etc/apt/sources.list.d/nginx.list | |
264 </programlisting> | |
265 | |
266 If you would like to use mainline nginx packages, | |
267 run the following command instead: | |
268 <programlisting> | |
269 echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ | |
270 http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx" \ | |
271 | sudo tee /etc/apt/sources.list.d/nginx.list | |
272 </programlisting> | |
273 </para> | |
274 | |
275 <para> | |
276 Set up repository pinning to prefer our packages over | |
277 distribution-provided ones: | |
278 <programlisting> | |
279 echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \ | |
280 | sudo tee /etc/apt/preferences.d/99nginx | |
281 </programlisting> | |
282 </para> | |
283 | |
284 <para> | |
277 To install nginx, run the following commands: | 285 To install nginx, run the following commands: |
278 <programlisting> | 286 <programlisting> |
279 sudo apt update | 287 sudo apt update |
280 sudo apt install nginx | 288 sudo apt install nginx |
281 </programlisting> | 289 </programlisting> |
287 <section name="Ubuntu" id="Ubuntu"> | 295 <section name="Ubuntu" id="Ubuntu"> |
288 | 296 |
289 <para> | 297 <para> |
290 Install the prerequisites: | 298 Install the prerequisites: |
291 <programlisting> | 299 <programlisting> |
292 sudo apt install curl gnupg2 ca-certificates lsb-release | 300 sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring |
293 </programlisting> | 301 </programlisting> |
294 | 302 </para> |
295 To set up the apt repository for stable nginx packages, | 303 |
296 run the following command: | 304 <para> |
297 <programlisting> | 305 Import an official nginx signing key so apt could verify the packages |
298 echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \ | |
299 | sudo tee /etc/apt/sources.list.d/nginx.list | |
300 </programlisting> | |
301 | |
302 If you would like to use mainline nginx packages, | |
303 run the following command instead: | |
304 <programlisting> | |
305 echo "deb http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \ | |
306 | sudo tee /etc/apt/sources.list.d/nginx.list | |
307 </programlisting> | |
308 | |
309 Set up repository pinning to prefer our packages over | |
310 distribution-provided ones: | |
311 <programlisting> | |
312 echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \ | |
313 | sudo tee /etc/apt/preferences.d/99nginx | |
314 </programlisting> | |
315 | |
316 Next, import an official nginx signing key so apt could verify the packages | |
317 authenticity. | 306 authenticity. |
318 Fetch the key: | 307 Fetch the key: |
319 <programlisting> | 308 <programlisting> |
320 curl -o /tmp/nginx_signing.key https://nginx.org/keys/nginx_signing.key | 309 curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \ |
310 | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null | |
321 </programlisting> | 311 </programlisting> |
322 | 312 |
323 Verify that the downloaded file contains the proper key: | 313 Verify that the downloaded file contains the proper key: |
324 <programlisting> | 314 <programlisting> |
325 gpg --dry-run --quiet --import --import-options show-only /tmp/nginx_signing.key | 315 gpg --dry-run --quiet --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg |
326 </programlisting> | 316 </programlisting> |
327 | 317 |
328 The output should contain the full fingerprint | 318 The output should contain the full fingerprint |
329 <command>573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62</command> | 319 <command>573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62</command> |
330 as follows: | 320 as follows: |
331 <programlisting> | 321 <programlisting> |
332 pub rsa2048 2011-08-19 [SC] [expires: 2024-06-14] | 322 pub rsa2048 2011-08-19 [SC] [expires: 2024-06-14] |
333 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 | 323 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 |
334 uid nginx signing key <signing-key@nginx.com> | 324 uid nginx signing key <signing-key@nginx.com> |
335 </programlisting> | 325 </programlisting> |
336 | 326 If the fingerprint is different, remove the file. |
337 Finally, move the key to apt trusted key storage (note the "asc" file extension change): | 327 </para> |
338 <programlisting> | 328 |
339 sudo mv /tmp/nginx_signing.key /etc/apt/trusted.gpg.d/nginx_signing.asc | 329 <para> |
340 </programlisting> | 330 To set up the apt repository for stable nginx packages, |
341 | 331 run the following command: |
332 <programlisting> | |
333 echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ | |
334 http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \ | |
335 | sudo tee /etc/apt/sources.list.d/nginx.list | |
336 </programlisting> | |
337 | |
338 If you would like to use mainline nginx packages, | |
339 run the following command instead: | |
340 <programlisting> | |
341 echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ | |
342 http://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \ | |
343 | sudo tee /etc/apt/sources.list.d/nginx.list | |
344 </programlisting> | |
345 </para> | |
346 | |
347 <para> | |
348 Set up repository pinning to prefer our packages over | |
349 distribution-provided ones: | |
350 <programlisting> | |
351 echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \ | |
352 | sudo tee /etc/apt/preferences.d/99nginx | |
353 </programlisting> | |
354 </para> | |
355 | |
356 <para> | |
342 To install nginx, run the following commands: | 357 To install nginx, run the following commands: |
343 <programlisting> | 358 <programlisting> |
344 sudo apt update | 359 sudo apt update |
345 sudo apt install nginx | 360 sudo apt install nginx |
346 </programlisting> | 361 </programlisting> |
490 </programlisting> | 505 </programlisting> |
491 </para> | 506 </para> |
492 | 507 |
493 </section> | 508 </section> |
494 | 509 |
510 | |
495 <section name="Amazon Linux" id="Amazon-Linux"> | 511 <section name="Amazon Linux" id="Amazon-Linux"> |
496 | 512 |
497 <para> | 513 <para> |
498 Install the prerequisites: | 514 Install the prerequisites: |
499 <programlisting> | 515 <programlisting> |
521 gpgkey=https://nginx.org/keys/nginx_signing.key | 537 gpgkey=https://nginx.org/keys/nginx_signing.key |
522 module_hotfixes=true | 538 module_hotfixes=true |
523 </programlisting> | 539 </programlisting> |
524 | 540 |
525 By default, the repository for stable nginx packages is used. | 541 By default, the repository for stable nginx packages is used. |
526 If you would like to use mainline nginx packages, run the following command: | 542 If you would like to use mainline nginx packages, |
543 run the following command: | |
527 <programlisting> | 544 <programlisting> |
528 sudo yum-config-manager --enable nginx-mainline | 545 sudo yum-config-manager --enable nginx-mainline |
529 </programlisting> | 546 </programlisting> |
530 | 547 |
531 To install nginx, run the following command: | 548 To install nginx, run the following command: |
560 <path>alpine/</path> on Alpine. | 577 <path>alpine/</path> on Alpine. |
561 </para> | 578 </para> |
562 | 579 |
563 <para> | 580 <para> |
564 Packaging sources are distributed under the same | 581 Packaging sources are distributed under the same |
565 <link url="../LICENSE">2-clause BSD-like license</link> used by nginx. | 582 <link url="../LICENSE">2-clause BSD-like license</link> |
583 used by nginx. | |
566 </para> | 584 </para> |
567 | 585 |
568 </section> | 586 </section> |
569 | 587 |
570 | 588 |