Ubuntu 16.04에 Nginx stable 최신 버전 설치 (공식 repository)

Ubuntu 16.04에 Nginx stable 최신 버전 설치 (공식 repository)

2022-10-03 last update

6 minutes reading nginx ubuntu16.04

소개



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

지원



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

LOG



리포지토리 등록


# apt update; apt install -y curl gnupg2 ca-certificates lsb-release
# echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | tee /etc/apt/sources.list.d/nginx.list
# curl -fsSL https://nginx.org/keys/nginx_signing.key | apt-key add -

# apt-key fingerprint ABF5BD827BD9BF62
pub   2048R/7BD9BF62 2011-08-19 [expires: 2024-06-14]
      Key fingerprint = 573B FD6B 3D8F BC64 1079  A6AB ABF5 BD82 7BD9 BF62
uid                  nginx signing key <[email protected]>

설치


# cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.6 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial

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

각종 확인


# which nginx
/usr/sbin/nginx

# nginx -v
nginx version: nginx/1.16.1

# apt show nginx
Package: nginx
Version: 1.16.1-1~xenial
Priority: optional
Section: httpd
Maintainer: Sergey Budnevitch <[email protected]>
Installed-Size: 3007 kB
Provides: httpd
Depends: init-system-helpers (>= 1.18~), libc6 (>= 2.17), libpcre3, libssl1.0.0 (>= 1.0.2~beta3), zlib1g (>= 1:1.1.4), lsb-base (>= 3.0-6), adduser
Conflicts: nginx-common, nginx-core
Replaces: nginx-common, nginx-core
Homepage: http://nginx.org
Download-Size: 839 kB
APT-Manual-Installed: yes
APT-Sources: http://nginx.org/packages/ubuntu xenial/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 are 13 additional records. Please use the '-a' switch to see them.