데비안 11에 Nginx stable 최신 버전 설치 (공식 repository)

데비안 11에 Nginx stable 최신 버전 설치 (공식 repository)

2022-10-03 last update

7 minutes reading Debian11 nginx

소개



공식 repository를 사용하여 Debian11에 Nginx stable 최신 버전 설치
상위 기사 : Nginx의 다양한 설치 방법과 EOL 요약
참고 : nginx: Linux packages

지원



이 방법으로 도입했을 경우, nginx의 개발이 정지할 때까지 서포트된다고 생각된다.
특정 버전을 지정하지 않으면 stable 최신 버전이 항상 제공되는 것으로 보입니다.

LOG



리포지토리 등록


# apt update; apt install -y curl gnupg2 ca-certificates lsb-release debian-archive-keyring
# curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
# gpg --dry-run --quiet --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
gpg: keyblock resource '/root/.gnupg/pubring.kbx': No such file or directory
pub   rsa2048 2011-08-19 [SC] [expires: 2024-06-14]
      573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
uid                      nginx signing key <[email protected]>
# echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" | tee /etc/apt/sources.list.d/nginx.list

설치


# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

# apt update; apt install -y nginx
... 略

각종 확인


# which nginx
/usr/sbin/nginx

# nginx -v
nginx version: nginx/1.20.1

# apt show nginx
Package: nginx
Version: 1.20.1-1~bullseye
Priority: optional
Section: httpd
Maintainer: NGINX Packaging <[email protected]>
Installed-Size: 3098 kB
Provides: httpd, nginx, nginx-r1.20.1
Depends: libc6 (>= 2.28), libcrypt1 (>= 1:4.1.0), libpcre3, libssl1.1 (>= 1.1.1), zlib1g (>= 1:1.1.4), lsb-base (>= 3.0-6), adduser
Conflicts: nginx-common, nginx-core
Replaces: nginx-common, nginx-core
Homepage: https://nginx.org
Download-Size: 879 kB
APT-Manual-Installed: yes
APT-Sources: http://nginx.org/packages/debian bullseye/nginx amd64 Packages
Description: high performance web server
 nginx [engine x] is an HTTP and reverse proxy server, as well as
 a mail proxy server.

N: There is 1 additional record. Please use the '-a' switch to see it