NGINX Plus 설치

지원되는 모든 Liunx 배포판의 기본 패키지 및 동적 모듈에 대한 단계별 지침에 따라 NGINX Plus를 설치하고 업그레이드 하는 방법을 알아보겠습니다.

이 문서에서는 Amazon Linux, CentOS, Debian, FreeBSD, Oracle Linux, Red Hat Enterprise Linux(RHEL), SUSE Linux Enterprise Server(SLES) 및 Ubuntu에 NGINX Plus를 설치하는 방법을 설명합니다.

전제 조건

  • NGINX Plus 구독(구매 또는 체험판)
  • 지원되는 운영 체제
  • root 권한
  • 이메일로 제공한 NGINX Plus 인증서 및 공개 키(nginx-repo.crt 및 nginx-repo.key파일)

목차

1. Amazon Linux 에서 NGINX Plus 설치
2. Amazon Linux 2 에서 NGINX Plus 설치
3. RHEL 7.4+, CentOS RHEL 7.4+ 및 Oracle Linux 7.4+에 NGINX Plus 설치
4. RHEL 8.1+ 및 Oracle Linux 8.1+에 NGINX Plus 설치
5. RHEL 9.0+에 NGINX Plus 설치
6. Debian 또는 Ubuntu에 NGINX Plus 설치
7. FreeBSD에 NGINX Plus 설치
8. SUSE Linux Enterprise Server에 NGINX Plus 설치
9. Alpine Linux에 NGINX Plus 설치

10. NGINX Plus 업그레이드
11. NGINX Plus 모듈 업그레이드

1. Amazon Linux 에서 NGINX Plus 설치

NGINX Plus R24 및 이전 버전은 Amazon Linux 2018.03+(x86_64)에 설치할 수 있습니다.

1. 이전 NGINX Plus 패키지가 설치되어 있는 경우 구성 및 로그 파일을 백업하는 것이 좋습니다. 자세한 내용은 “NGINX Plus 업그레이드“를 참조하십시오.

2. /etc/ssl/nginx 디렉토리를 생성합니다.

$ sudo mkdir -p /etc/ssl/nginx
$ cd /etc/ssl/nginx

3. 이메일로 전달 받은 nginx-repo.crtnginx-repo.key 파일을 준비합니다.

4. 필요한 ca-certificates 종속성을 설치합니다.

$ sudo yum install ca-certificates

5. nginx-repo.crtnginx-repo.key 파일을 /etc/ssl/nginx/ 디렉토리로 복사합니다.

$ sudo cp nginx-repo.crt /etc/ssl/nginx/
$ sudo cp nginx-repo.key /etc/ssl/nginx/

6. nginx-plus-amazon.repo 파일을 /etc/yum.repos.d 에 다운로드하여 NGINX Plus 저장소를 추가합니다.

$ sudo wget -P /etc/yum.repos.d https://cs.nginx.com/static/files/nginx-plus-amazon.repo

7. nginx-plus 패키지를 설치합니다. 이전 NGINX Plus 패키지는 자동으로 교체됩니다.

$ sudo yum install nginx-plus

8. NGINX ModSecurity 구독이 있는 경우 ModSecurity 모듈을 설치합니다.

$ sudo yum install nginx-plus nginx-plus-module-modsecurity

9. nginx binary 버전을 확인하여 NGINX Plus 가 올바르게 설치되어 있는지 확인합니다.

$ nginx -v

2. Amazon Linux 2 에서 NGINX Plus 설치

NGINX Plus는 Amazon Linux 2 LTS(x86_64, aarch64)에 설치할 수 있습니다.

1. 이전 NGINX Plus 패키지가 설치되어 있는 경우 구성 및 로그 파일을 백업하는 것이 좋습니다. 자세한 내용은 “NGINX Plus 업그레이드“를 참조하십시오.

2. /etc/ssl/nginx 디렉토리를 생성합니다.

$ sudo mkdir -p /etc/ssl/nginx
$ cd /etc/ssl/nginx

3. 이메일로 전달 받은 nginx-repo.crtnginx-repo.key 파일을 준비합니다.

4. 필요한 ca-certificates 종속성을 설치합니다.

$ sudo yum install ca-certificates

5. nginx-repo.crtnginx-repo.key 파일을 /etc/ssl/nginx/ 디렉토리로 복사합니다.

$ sudo cp nginx-repo.crt /etc/ssl/nginx/
$ sudo cp nginx-repo.key /etc/ssl/nginx/

6. nginx-plus-amazon2.repo 파일을 /etc/yum.repos.d 에 다운로드하여 NGINX Plus 저장소를 추가합니다.

sudo wget -P /etc/yum.repos.d https://cs.nginx.com/static/files/nginx-plus-amazon2.repo

7. nginx-plus 패키지를 설치합니다. 이전 NGINX Plus 패키지는 자동으로 교체됩니다.

$ sudo yum install nginx-plus

8. NGINX ModSecurity 구독이 있는 경우 ModSecurity 모듈을 설치합니다.

$ sudo yum install nginx-plus nginx-plus-module-modsecurity

9. nginx binary 버전을 확인하여 NGINX Plus가 올바르게 설치되어 있는지 확인합니다.

$ nginx -v

3. RHEL 7.4+, CentOS RHEL 7.4+ 및 Oracle Linux 7.4+에 NGINX Plus 설치

NGINX Plus는 다음 버전의 CentOS/Oracle 리눅스/RHEL에 설치할 수 있습니다.

  • CentOS 7.4+ (x86_64, aarch64)
  • Oracle Linux 7.4+ (x86_64)
  • Red Hat Enterprise Linux 7.4+ (x86_64, aarch64)

1. 이전 NGINX Plus 패키지가 설치되어 있는 경우 구성 및 로그 파일을 백업하는 것이 좋습니다. 자세한 내용은 “NGINX Plus 업그레이드“를 참조하십시오.

2. /etc/ssl/nginx 디렉토리를 생성합니다.

$ sudo mkdir -p /etc/ssl/nginx
$ cd /etc/ssl/nginx

3. 이메일로 전달 받은 nginx-repo.crtnginx-repo.key 파일을 준비합니다.

4. nginx-repo.crtnginx-repo.key 파일을 /etc/ssl/nginx/ 디렉토리로 복사합니다.

$ sudo cp nginx-repo.crt /etc/ssl/nginx/
$ sudo cp nginx-repo.key /etc/ssl/nginx/

5. 필요한 ca-certificates 종속성을 설치합니다.

$ sudo yum install ca-certificates

6. NGINX App Protect 구독이 있는 경우 다음과 같이 epel-release 종속성을 설치합니다.

$ sudo yum install epel-release

7. nginx-plus-7.4.repo 파일을 /etc/yum.repos.d 에 다운로드하여 NGINX Plus 저장소를 추가합니다.

$ sudo wget -P /etc/yum.repos.d https://cs.nginx.com/static/files/nginx-plus-7.4.repo

8. NGINX App Protect 구독이 있는 경우 app-protect-7.repo 파일을 /etc/yum.repos.d 에 다운로드하여 NGINX App Protect 저장소를 추가합니다.

$ sudo wget -P /etc/yum.repos.d https://cs.nginx.com/static/files/app-protect-7.repo

9. NGINX ModSecurity 구독이 있는 경우 modsecurity-7.repo 파일을 /etc/yum.repos.d 에 다운로드하여 NGINX ModSecurity 저장소를 추가합니다.

$ sudo wget -P /etc/yum.repos.d https://cs.nginx.com/static/files/modsecurity-7.repo

10. nginx-plus 패키지를 설치합니다. 이전 NGINX Plus 패키지는 자동으로 교체됩니다.

$ sudo yum install nginx-plus

11. NGINX App Protect 구독이 있는 경우 NGINX App Protect 및 해당 서명을 설치합니다.

$ sudo yum install nginx-plus app-protect app-protect-attack-signatures

12. NGINX ModSecurity 구독이 있는 경우 ModSecurity 모듈을 설치합니다.

$ sudo yum install nginx-plus nginx-plus-module-modsecurity

13. 부팅 시 nginx 서비스 시작을 활성화하려면 다음 명령을 실행합니다.

$ sudo systemctl enable nginx.service

14. nginx binary 버전을 확인하여 NGINX Plus가 올바르게 설치되어 있는지 확인합니다.

$ nginx -v

4. RHEL 8.1+ 및 Oracle Linux 8.1+에 NGINX Plus 설치

NGINX Plus는 다음 버전의 CentOS/RHEL에 설치할 수 있습니다.

  • Red Hat Enterprise Linux 8.1+ (x86_64, aarch64, s390x)
  • Oracle Linux 8.1+ (x86_64, aarch64)

1. 이전 NGINX Plus 패키지가 설치되어 있는 경우 구성 및 로그 파일을 백업하는 것이 좋습니다. 자세한 내용은 “NGINX Plus 업그레이드“를 참조하십시오.

2. /etc/ssl/nginx 디렉토리를 생성합니다.

$ sudo mkdir -p /etc/ssl/nginx
$ cd /etc/ssl/nginx

3. 이메일로 전달 받은 nginx-repo.crtnginx-repo.key 파일을 준비합니다.

4. nginx-repo.crtnginx-repo.key 파일을 /etc/ssl/nginx/ 디렉토리로 복사합니다.

$ sudo cp nginx-repo.crt /etc/ssl/nginx/
$ sudo cp nginx-repo.key /etc/ssl/nginx/

5. 필요한 ca-certificates 종속성을 설치합니다.

$ sudo yum install ca-certificates

6. nginx-plus-8.repo 파일을 /etc/yum.repos.d 에 다운로드하여 NGINX Plus 저장소를 추가합니다.

$ sudo wget -P /etc/yum.repos.d https://cs.nginx.com/static/files/nginx-plus-8.repo

7. NGINX ModSecurity 구독이 있는 경우 modsecurity-8.repo 파일을 /etc/yum.repos.d 에 다운로드하여 NGINX ModSecurity 저장소를 추가합니다.

$ sudo wget -P /etc/yum.repos.d https://cs.nginx.com/static/files/modsecurity-8.repo

8. nginx-plus 패키지를 설치합니다. 이전 NGINX Plus 패키지는 자동으로 교체됩니다.

$ sudo yum install nginx-plus

9 NGINX ModSecurity 구독이 있는 경우 ModSecurity 모듈을 설치합니다.

$ sudo yum install nginx-plus nginx-plus-module-modsecurity

10. 부팅 시 nginx 서비스 시작을 활성화하려면 다음 명령을 실행합니다.

$ sudo systemctl enable nginx.service

11. nginx binary 버전을 확인하여 NGINX Plus 가 올바르게 설치되어 있는지 확인합니다.

$ nginx -v

5. RHEL 9.0+에 NGINX Plus 설치

NGINX Plus는 다음 버전의 CentOS/RHEL에 설치할 수 있습니다.

  • Red Hat Enterprise Linux 9.0+ (x86_64, aarch64, s390x)

1. 이전 NGINX Plus 패키지가 설치되어 있는 경우 구성 및 로그 파일을 백업하는 것이 좋습니다. 자세한 내용은 “NGINX Plus 업그레이드“를 참조하십시오.

2. /etc/ssl/nginx 디렉토리를 생성합니다.

$ sudo mkdir -p /etc/ssl/nginx
$ cd /etc/ssl/nginx

3. 이메일로 전달 받은 nginx-repo.crtnginx-repo.key 파일을 준비합니다.

4. nginx-repo.crtnginx-repo.key 파일을 /etc/ssl/nginx/ 디렉토리로 복사합니다.

$ sudo cp nginx-repo.crt /etc/ssl/nginx/
$ sudo cp nginx-repo.key /etc/ssl/nginx/

5. 필요한 ca-certificates 종속성을 설치합니다.

$ sudo yum install ca-certificates

6. plus-9.repo 파일을 /etc/yum.repos.d 에 다운로드하여 NGINX Plus 저장소를 추가합니다.

$ sudo wget -P /etc/yum.repos.d https://cs.nginx.com/static/files/plus-9.repo

7. NGINX ModSecurity 구독이 있는 경우 modsecurity-9.repo 파일을 /etc/yum.repos.d 에 다운로드하여 NGINX ModSecurity 저장소를 추가합니다.

$ sudo wget -P /etc/yum.repos.d https://cs.nginx.com/static/files/modsecurity-9.repo

8. nginx-plus 패키지를 설치합니다. 이전 NGINX Plus 패키지는 자동으로 교체됩니다.

$ sudo yum install nginx-plus

9 NGINX ModSecurity 구독이 있는 경우 ModSecurity 모듈을 설치합니다..

$ sudo yum install nginx-plus nginx-plus-module-modsecurity

10. 부팅 시 nginx 서비스 시작을 활성화하려면 다음 명령을 실행합니다.

$ sudo systemctl enable nginx.service

11. nginx binary 버전을 확인하여 NGINX Plus 가 올바르게 설치되어 있는지 확인합니다.

$ nginx -v

6. Debian 또는 Ubuntu에 NGINX Plus 설치

NGINX Plus는 다음 버전의 Debian 또는 Ubuntu에 설치할 수 있습니다.

  • Debian 10 (x86_64, aarch64)
  • Debian 11 (x86_64, aarch64)
  • Ubuntu 18.04 LTS (“Bionic”) (x86_64, aarch64)
  • Ubuntu 20.04 LTS (“Focal”) (x86_64, aarch64, s390x)
  • Ubuntu 22.04 LTS (“Jammy”) (x86_64, aarch64, s390x)

1. 이전 NGINX Plus 패키지가 설치되어 있는 경우 구성 및 로그 파일을 백업하는 것이 좋습니다. 자세한 내용은 “NGINX Plus 업그레이드“를 참조하십시오.

2. /etc/ssl/nginx 디렉토리를 생성합니다.

$ sudo mkdir /etc/ssl/nginx
$ cd /etc/ssl/nginx

3. 이메일로 전달 받은 nginx-repo.crtnginx-repo.key 파일을 준비합니다.

4. nginx-repo.crtnginx-repo.key 파일을 /etc/ssl/nginx/ 디렉토리로 복사합니다.

$ sudo cp nginx-repo.crt /etc/ssl/nginx/
$ sudo cp nginx-repo.key /etc/ssl/nginx/

5. 필수 구성 요소 패키지를 설치합니다.

For Debian:

$ sudo apt-get install apt-transport-https lsb-release ca-certificates wget gnupg2 debian-archive-keyring

For Ubuntu:

$ sudo apt-get install apt-transport-https lsb-release ca-certificates wget gnupg2 ubuntu-keyring

6. NGINX 서명 키App Protect 보안 업데이트 서명 키 다운로드 및 추가합니다.

$ wget -qO - https://cs.nginx.com/static/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
$ wget -qO - https://cs.nginx.com/static/keys/app-protect-security-updates.key | gpg --dearmor | sudo tee /usr/share/keyrings/app-protect-security-updates.gpg >/dev/null

7. NGINX Plus 저장소를 추가합니다.

For Debian:

$ printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://pkgs.nginx.com/plus/debian `lsb_release -cs` nginx-plus\n" | sudo tee /etc/apt/sources.list.d/nginx-plus.list

For Ubuntu:

$ printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://pkgs.nginx.com/plus/ubuntu `lsb_release -cs` nginx-plus\n" | sudo tee /etc/apt/sources.list.d/nginx-plus.list

8. NGINX App Protect 구독이 있는 경우 해당 저장소를 추가합니다.

For Debian:

$ printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://pkgs.nginx.com/app-protect/debian `lsb_release -cs` nginx-plus\n" | sudo tee /etc/apt/sources.list.d/nginx-app-protect.list

$ printf "deb [signed-by=/usr/share/keyrings/app-protect-security-updates.gpg] https://pkgs.nginx.com/app-protect-security-updates/debian `lsb_release -cs` nginx-plus\n" | sudo tee -a /etc/apt/sources.list.d/nginx-app-protect.list

For Ubuntu:

$ printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://pkgs.nginx.com/app-protect/ubuntu `lsb_release -cs` nginx-plus\n" | sudo tee /etc/apt/sources.list.d/nginx-app-protect.list

$ printf "deb [signed-by=/usr/share/keyrings/app-protect-security-updates.gpg] https://pkgs.nginx.com/app-protect-security-updates/ubuntu `lsb_release -cs` nginx-plus\n" | sudo tee -a /etc/apt/sources.list.d/nginx-app-protect.list

9. NGINX ModSecurity 구독이 있는 경우 NGINX ModSecurity 저장소를 추가합니다.

For Debian:

$ printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://pkgs.nginx.com/modsecurity/debian `lsb_release -cs` nginx-plus\n" | sudo tee /etc/apt/sources.list.d/nginx-modsecurity.list

For Ubuntu:

$ printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://pkgs.nginx.com/modsecurity/ubuntu `lsb_release -cs` nginx-plus\n" | sudo tee /etc/apt/sources.list.d/nginx-modsecurity.list

10. nginx-plus apt 구성을 /etc/apt/apt.conf.d 에 다운로드합니다.

$ sudo wget -P /etc/apt/apt.conf.d https://cs.nginx.com/static/files/90pkgs-nginx

11. 저장소를 업데이트합니다.

$ sudo apt-get update

12. nginx-plus 패키지를 설치합니다. 이전 NGINX Plus 패키지는 자동으로 교체됩니다.

$ sudo apt-get install -y nginx-plus

13. NGINX App Protect 구독이 있는 경우 NGINX App Protect 및 해당 서명을 설치합니다.

$ sudo apt-get install app-protect app-protect-attack-signatures

14. NGINX ModSecurity 구독이 있는 경우 ModSecurity 모듈을 설치합니다.

$ sudo apt-get install nginx-plus nginx-plus-module-modsecurity

15. nginx binary 버전을 확인하여 NGINX Plus 가 올바르게 설치되어 있는지 확인합니다.

$ nginx -v

7. FreeBSD에 NGINX Plus 설치

NGINX Plus는 다음 버전의 FreeBSD에 설치할 수 있습니다.

  • FreeBSD 12.1+ (amd64)
  • FreeBSD 13 (amd64)

1. 이전 NGINX Plus 패키지가 설치되어 있는 경우 구성 및 로그 파일을 백업하는 것이 좋습니다. 자세한 내용은 “NGINX Plus 업그레이드“를 참조하십시오.

2. /etc/ssl/nginx 디렉토리를 생성합니다.

$ sudo mkdir -p /etc/ssl/nginx
$ cd /etc/ssl/nginx

3. 이메일로 전달 받은 nginx-repo.crtnginx-repo.key 파일을 준비합니다.

4. nginx-repo.crtnginx-repo.key 파일을 /etc/ssl/nginx/ 디렉토리로 복사합니다.

$ sudo cp nginx-repo.crt /etc/ssl/nginx/
$ sudo cp nginx-repo.key /etc/ssl/nginx/

5. 필수 구성 요소 ca_root_nss 패키지를 설치합니다.

$ sudo pkg install ca_root_nss

6. nginx-plus.conf 파일을 /etc/pkg/ 디렉토리에 복사합니다.

$ sudo fetch -o /etc/pkg/nginx-plus.conf http://cs.nginx.com/static/files/nginx-plus.conf

7. NGINX ModSecurity 구독이 있는 경우 NGINX ModSecurity 저장소를 추가합니다.

$ sudo fetch -o /etc/pkg/modsecurity.conf http://cs.nginx.com/static/files/modsecurity.conf

8. /usr/local/etc/pkg.conf 파일에 다음 줄을 추가합니다.

PKG_ENV: { SSL_NO_VERIFY_PEER: "1",
SSL_CLIENT_CERT_FILE: "/etc/ssl/nginx/nginx-repo.crt",
SSL_CLIENT_KEY_FILE: "/etc/ssl/nginx/nginx-repo.key" }

9. nginx-plus 패키지를 설치합니다. 이전 NGINX Plus 패키지는 자동으로 교체됩니다.

$ sudo pkg install nginx-plus

10. NGINX ModSecurity 구독이 있는 경우 ModSecurity 모듈을 설치합니다.

$ sudo pkg install nginx-plus nginx-plus-module-modsecurity

11. nginx binary 버전을 확인하여 NGINX Plus 가 올바르게 설치되어 있는지 확인합니다.

$ nginx -v

8. SUSE Linux Enterprise Server에 NGINX Plus 설치

NGINX Plus는 SUSE Linux Enterprise Server 12 SP5(x86_64), 15 SP2(x86_64)에 설치할 수 있습니다.

1. 이전 NGINX Plus 패키지가 설치되어 있는 경우 구성 및 로그 파일을 백업하는 것이 좋습니다. 자세한 내용은 “NGINX Plus 업그레이드“를 참조하십시오.

2. /etc/ssl/nginx 디렉토리를 생성합니다.

$ sudo mkdir /etc/ssl/nginx
$ cd /etc/ssl/nginx

3. 이메일로 전달 받은 nginx-repo.crtnginx-repo.key 파일을 준비합니다.

4. nginx-repo.crtnginx-repo.key 파일을 /etc/ssl/nginx/ 디렉토리로 복사합니다.

$ sudo cp nginx-repo.crt /etc/ssl/nginx/
$ sudo cp nginx-repo.key /etc/ssl/nginx/

5. 인증서 및 키의 파일 번들을 생성합니다.

$ cat /etc/ssl/nginx/nginx-repo.crt /etc/ssl/nginx/nginx-repo.key > /etc/ssl/nginx/nginx-repo-bundle.crt

6. 필요한 ca-certificates 종속성을 설치합니다.

$ zypper install ca-certificates

7. nginx-plus 저장소를 추가합니다.

For SLES 12:

$ zypper addrepo -G -t yum -c 'https://pkgs.nginx.com/plus/sles/12?ssl_clientcert=/etc/ssl/nginx/nginx-repo-bundle.crt&ssl_verify=peer' nginx-plus

For SLES 15:

$ zypper addrepo -G -t yum -c 'https://pkgs.nginx.com/plus/sles/15?ssl_clientcert=/etc/ssl/nginx/nginx-repo-bundle.crt&ssl_verify=peer' nginx-plus

8. NGINX ModSecurity 구독이 있는 경우 ModSecurity 저장소를 추가합니다.

For SLES 12:

$ zypper addrepo -G -t yum -c 'https://pkgs.nginx.com/modsecurity/sles/12?ssl_clientcert=/etc/ssl/nginx/nginx-repo-bundle.crt&ssl_verify=peer' nginx-modsecurity

For SLES 15:

$ zypper addrepo -G -t yum -c 'https://pkgs.nginx.com/modsecurity/sles/15?ssl_clientcert=/etc/ssl/nginx/nginx-repo-bundle.crt&ssl_verify=peer' nginx-modsecurity

9. nginx-plus 패키지를 설치합니다. 이전 NGINX Plus 패키지는 자동으로 교체됩니다.

$ zypper install nginx-plus

10. NGINX ModSecurity 구독이 있는 경우 ModSecurity 패키지를 설치합니다.

$ zypper install nginx-plus-module-modsecurity

9. Alpine Linux에 NGINX Plus 설치

NGINX Plus는 Alpine Linux 3.13(x86_64, aarch64), 3.14(x86_64, aarch64), 3.15(x86_64, aarch64), 3.16(x86_64, aarch64)에 설치할 수 있습니다.

1. 이전 NGINX Plus 패키지가 설치되어 있는 경우 구성 및 로그 파일을 백업하는 것이 좋습니다. 자세한 내용은 “NGINX Plus 업그레이드“를 참조하십시오.

2. 이메일로 전달 받은 nginx-repo.crtnginx-repo.key 파일을 준비합니다.

3. nginx-repo.key/etc/apk/cert.key 에 업로드하고 nginx-repo.crt/etc/apk/cert.pem 에 업로드합니다. 파일에 다른 인증서와 키가 포함되어 있지 않은지 확인하십시오. Alpine Linux는 다른 저장소에 대한 클라이언트 인증서 혼합을 지원하지 않습니다.

4. NGINX 서명 공개 키를 /etc/apk/keys 디렉토리에 넣습니다.

$ sudo wget -O /etc/apk/keys/nginx_signing.rsa.pub https://cs.nginx.com/static/keys/nginx_signing.rsa.pub

5. /etc/apk/reposities 파일에 NGINX 저장소를 추가합니다.

$ printf "https://pkgs.nginx.com/plus/alpine/v`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release`/main\n" | sudo tee -a /etc/apk/repositories

6. NGINX App Protect 구독이 있는 경우 NGINX App Protect 저장소를 추가합니다.

$ printf "https://pkgs.nginx.com/app-protect/alpine/v`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release`/main\n" | sudo tee -a /etc/apk/repositories

7. NGINX ModSecurity 구독이 있는 경우 NGINX ModSecurity 저장소를 추가합니다.

$ printf "https://pkgs.nginx.com/modsecurity/alpine/v`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release`/main\n" | sudo tee -a /etc/apk/repositories

8. 커뮤니티에서 지원하는 모든 NGINX 패키지를 제거하는 것이 좋습니다. 모든 NGINX 모듈도 제거됩니다.

$ sudo apk del -r nginx

9. NGINX Plus 패키지를 설치합니다.

$ sudo apk add nginx-plus

10. NGINX App Protect 구독이 있는 경우 NGINX App Protect 및 해당 서명을 설치합니다.

$ sudo apk add app-protect app-protect-attack-signatures

11. NGINX ModSecurity 구독이 있는 경우 ModSecurity 패키지를 설치합니다.

$ sudo apk add nginx-plus nginx-plus-module-modsecurity

12. nginx binary 버전을 확인하여 NGINX Plus 가 올바르게 설치되어 있는지 확인합니다.

$ nginx -v

10. NGINX Plus 업그레이드

Note: 릴리스 24(R24)부터 NGINX Plus 저장소는 운영 체제 배포 및 라이센스 구독을 기반으로 개별 저장소로 분리되었습니다. 이전 NGINX Plus 버전에서 업그레이드하기 전에 먼저 올바른 위치를 가리키도록 저장소를 재구성해야 합니다. 저장소를 다시 구성하려면 위의 운영 체제에 대한 설치 지침을 따르십시오.

1. 시스템에 이전 NGINX 또는 NGINX Plus 패키지가 있는 경우 구성 및 로그 파일을 백업합니다.

Linux 배포판의 경우:

$ sudo cp -a /etc/nginx /etc/nginx-plus-backup
$ sudo cp -a /var/log/nginx /var/log/nginx-plus-backup

FreeBSD의 경우:

$ sudo cp -a /usr/local/etc/nginx /usr/local/etc/nginx-plus-backup
$ sudo cp -a /var/log/nginx /var/log/nginx-plus-backup

2. 새로운 NGINX Plus 패키지로 업그레이드합니다.

For Amazon Linux, CentOS, Oracle Linux, and RHEL:

$ sudo yum upgrade nginx-plus

For Debian and Ubuntu:

$ sudo apt-get update
$ sudo apt-get install nginx-plus

For FreeBSD:

$ sudo pkg upgrade nginx-plus

새 NGINX Plus 버전이 실행 중인지 확인하려면 다음을 실행합니다.

$ nginx -v

11. NGINX Plus 모듈 업그레이드

업그레이드 절차는 모듈이 어떻게 공급되고 설치되어 있는지 에 따라 달라집니다.

NGINX 인증 및 NGINX 인증 커뮤니티 동적 모듈은 NGINX Plus와 함께 자동으로 업데이트 됩니다.

Note: FreeBSD의 경우 각 NGINX 작성 및 NGINX 인증 모듈은 FreeBSD 패키지 관리 도구를 사용하여 별도로 업데이트해야 합니다.

커뮤니티 동적 모듈은 해당 NGINX 오픈 소스 버전에 대해 다시 컴파일해야 합니다. NGINX 커뮤니티 모듈 설치를 참조하십시오.