|
1 |
| -1. Create the `/etc/ssl/nginx/` directory: |
| 1 | +Create the `/etc/ssl/nginx/` directory: |
2 | 2 |
|
3 |
| - ```shell |
4 |
| - sudo mkdir -p /etc/ssl/nginx |
5 |
| - ``` |
| 3 | +```shell |
| 4 | +sudo mkdir -p /etc/ssl/nginx |
| 5 | +``` |
6 | 6 |
|
7 |
| -2. Upload **nginx-repo.crt** and **nginx-repo.key** files to the `/etc/ssl/nginx/` directory. |
| 7 | +Upload **nginx-repo.crt** and **nginx-repo.key** files to the `/etc/ssl/nginx/` directory. |
8 | 8 |
|
9 |
| -3. Remove any previous NGINX repository and apt configuration files: |
| 9 | +Remove any previous NGINX repository and apt configuration files: |
10 | 10 |
|
11 |
| - ```shell |
12 |
| - sudo rm /etc/apt/sources.list.d/nginx*.list |
13 |
| - sudo rm /etc/apt/sources.list.d/*app-protect*.list |
14 |
| - sudo rm /etc/apt/apt.conf.d/90pkgs-nginx |
15 |
| - ``` |
| 11 | +```shell |
| 12 | +sudo rm /etc/apt/sources.list.d/nginx*.list |
| 13 | +sudo rm /etc/apt/sources.list.d/*app-protect*.list |
| 14 | +sudo rm /etc/apt/apt.conf.d/90pkgs-nginx |
| 15 | +``` |
16 | 16 |
|
17 |
| -4. Install prerequisite packages: |
| 17 | +Install prerequisite packages: |
18 | 18 |
|
19 |
| - ```shell |
20 |
| - sudo apt-get update && sudo apt-get install apt-transport-https lsb-release ca-certificates wget gnupg2 debian-archive-keyring |
21 |
| - ``` |
| 19 | +```shell |
| 20 | +sudo apt-get update && sudo apt-get install apt-transport-https lsb-release ca-certificates wget gnupg2 debian-archive-keyring |
| 21 | +``` |
22 | 22 |
|
23 |
| -5. Download and add the NGINX signing key: |
| 23 | +Download and add the NGINX signing key: |
24 | 24 |
|
25 |
| - ```shell |
26 |
| - wget -qO - https://cs.nginx.com/static/keys/nginx_signing.key | gpg --dearmor | \ |
27 |
| - sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null |
28 |
| - ``` |
| 25 | +```shell |
| 26 | +wget -qO - https://cs.nginx.com/static/keys/nginx_signing.key | gpg --dearmor | \ |
| 27 | +sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null |
| 28 | +``` |
29 | 29 |
|
30 |
| -6. Download the apt configuration to `/etc/apt/apt.conf.d`: |
| 30 | +Download the apt configuration to `/etc/apt/apt.conf.d`: |
31 | 31 |
|
32 |
| - ```shell |
33 |
| - sudo wget -P /etc/apt/apt.conf.d https://cs.nginx.com/static/files/90pkgs-nginx |
34 |
| - ``` |
| 32 | +```shell |
| 33 | +sudo wget -P /etc/apt/apt.conf.d https://cs.nginx.com/static/files/90pkgs-nginx |
| 34 | +``` |
35 | 35 |
|
36 |
| -7. Verify that the downloaded file contains the proper key: |
| 36 | +Verify that the downloaded file contains the proper key: |
37 | 37 |
|
38 |
| - ```shell |
39 |
| - gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg |
40 |
| - ``` |
| 38 | +```shell |
| 39 | +gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg |
| 40 | +``` |
41 | 41 |
|
42 |
| - The output should contain the full fingerprint `573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62` as follows: |
| 42 | +The output should contain the full fingerprint `573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62` as follows: |
43 | 43 |
|
44 |
| - ```none |
45 |
| - pub rsa2048 2011-08-19 [SC] [expires: 2027-05-24] |
46 |
| - 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 |
47 |
| - uid nginx signing key <signing-key@nginx.com> |
48 |
| - ``` |
| 44 | +```none |
| 45 | +pub rsa2048 2011-08-19 [SC] [expires: 2027-05-24] |
| 46 | + 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 |
| 47 | +uid nginx signing key <signing-key@nginx.com> |
| 48 | +``` |
49 | 49 |
|
50 |
| - If the fingerprint is different, remove the file. |
| 50 | +If the fingerprint is different, remove the file. |
0 commit comments