Let's Encrypt 인증서 설치를 위해 내 Lightsail 인스턴스에 Certbot 패키지를 어떻게 설치하나요?

4분 분량
0

Certbot 패키지를 사용하여 Amazon Lightsail 인스턴스에 Let's Encrypt 인증서를 설치하려고 합니다.

간략한 설명

워드프레스 및 LAMP와 같은 Bitnami 스택을 사용하는 라이트세일 인스턴스에는 bncert-tool이라는 자체 설치 도구가 있어 Let's Encrypt 인증서를 설치합니다. cPanel 및 Plesk와 같은 청사진에도 자체 설치 도구가 있으며 Certbot 패키지가 필요하지 않습니다. 하지만 Ubuntu 및 Amazon Linux 2와 같은 다른 Lightsail 인스턴스 청사진에 설치하려면 Certbot 패키지가 필요합니다.

해결 방법

Amazon Linux 2 및 FreeBSD를 제외한 모든 Linux 배포판은 snapd를 사용하여 Certbot 도구를 설치할 수 있습니다. 운영 체제(OS)에 따라 Certbot 도구를 설치합니다.

사전 요구 사항

apt, dnf 또는 yum과 같은 다른 OS 패키지 관리자를 사용하여 설치한 모든 Certbot 패키지를 제거합니다. 다음은 Certbot 패키지를 제거할 수 있는 명령의 예입니다.

sudo apt-get remove certbot
sudo dnf remove certbot
sudo yum remove certbot

참고: 도메인에서 Certbot 웹사이트의 DNS 플러그인에 나열된 DNS 공급자 중 하나를 사용하는 경우 DNS 플러그인을 설치해야 합니다.

Amazon Linux 2

Amazon Linux 2에 Certbot 도구를 설치하려면 다음 명령을 실행합니다.

sudo yum update
sudo rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y certbot

Certbot 사용 가이드에 나열된 DNS 공급자를 사용하는 경우, 다음 명령을 실행하여 DNS 플러그인을 설치합니다.

sudo yum install -y python2-certbot-dns-route53

참고: route53을 도메인 DNS 공급자로 바꿉니다.

botocore 호환성 오류가 발생하면 pip 명령을 실행하여 botocore를 다시 설치합니다.

sudo pip uninstall botocore boto3 && sudo pip install boto3

Amazon Linux 2023

Amazon Linux 2023에 Certbot 도구를 설치하려면 다음 명령을 실행합니다.

sudo yum update
sudo dnf install python3 augeas-libs
sudo python3 -m venv /opt/certbot/
sudo /opt/certbot/bin/pip install --upgrade pip
sudo /opt/certbot/bin/pip install certbot

Ubuntu 16.04, 18.04, 20.04 및 22.04

Ubuntu 16.04, 18.04, 20.04 및 22.04에 Certbot 도구를 설치하려면 다음 명령을 실행합니다.

sudo snap install core;
sudo snap refresh core;
sudo snap install --classic certbot

Certbot 사용 가이드에 나열된 DNS 공급자를 사용하는 경우, 다음 명령을 실행하여 DNS 플러그인을 설치합니다.

sudo snap set certbot trust-plugin-with-root=ok
sudo snap install --beta certbot-dns-route53
sudo snap connect certbot:plugin certbot-dns-route53

참고: route53을 도메인 DNS 공급자로 바꿉니다.

Debian 11, 10.8, 9.13, 8.7

Debian 11, 10.8, 9.13, 8.7에 Certbot 도구를 설치하려면 다음 명령을 실행합니다.

sudo apt install snapd -y
sudo snap install core;
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /sbin/certbot

Certbot 사용 가이드에 나열된 DNS 공급자를 사용하는 경우, 다음 명령을 실행하여 DNS 플러그인을 설치합니다.

sudo snap install --beta --classic certbot
sudo snap set certbot trust-plugin-with-root=ok
sudo snap install --beta certbot-dns-route53
sudo snap connect certbot:plugin certbot-dns-route53

참고: route53을 도메인 DNS 공급자로 바꿉니다.

CentOS 7.9

CentOS 7.9에 Certbot 도구를 설치하려면 다음 명령을 실행합니다.

sudo yum install epel-release
sudo yum-config-manager --enable cr
sudo yum install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
sudo snap install --classic certbot
sudo ln -s /var/lib/snapd/snap/bin/certbot /sbin/certbot

Certbot 사용 가이드에 나열된 DNS 공급자를 사용하는 경우, 다음 명령을 실행하여 DNS 플러그인을 설치합니다.

sudo snap set certbot trust-plugin-with-root=ok
sudo snap install --beta certbot-dns-route53
sudo snap connect certbot:plugin certbot-dns-route53

참고: route53을 도메인 DNS 공급자로 바꿉니다.

CentOS 8.2, 9

CentOS 8.2 및 9에 Certbot 도구를 설치하려면 다음 명령을 실행합니다.

sudo dnf install epel-release
sudo dnf upgrade
sudo dnf config-manager --enable cr
sudo yum install snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
sudo snap install --classic certbot
sudo ln -s /var/lib/snapd/snap/bin/certbot /sbin/certbot

Certbot 사용 가이드에 나열된 DNS 공급자를 사용하는 경우, 다음 명령을 실행하여 DNS 플러그인을 설치합니다.

sudo snap set certbot trust-plugin-with-root=ok
sudo snap install --beta certbot-dns-route53
sudo snap connect certbot:plugin certbot-dns-route53

참고: route53을 도메인 DNS 공급자로 바꿉니다.

OpenSUSE 15.4

OpenSUSE 15.4에 Certbot 도구를 설치하려면 다음 명령을 실행합니다.

sudo zypper addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_15.4 snappy
sudo zypper --gpg-auto-import-keys refresh
sudo zypper dup --from snappy
sudo zypper install snapd
sudo systemctl enable --now snapd
sudo zypper in -t pattern apparmor
sudo snap install core;
sudo snap refresh core;
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot

Certbot 사용 가이드에 나열된 DNS 공급자를 사용하는 경우, 다음 명령을 실행하여 DNS 플러그인을 설치합니다.

sudo snap set certbot trust-plugin-with-root=ok
sudo snap install --beta certbot-dns-route53
sudo snap connect certbot:plugin certbot-dns-route53

참고: route53을 도메인 DNS 공급자로 바꿉니다.

FreeBSD 12.4

FreeBSD 12.4에 Certbot 도구를 설치하려면 다음 명령을 실행합니다.

su
pkg install security/py-certbot

Certbot 사용 가이드에 나열된 DNS 공급자를 사용하는 경우, 다음 명령을 실행하여 DNS 플러그인을 설치합니다.

pkg install py39-certbot-dns-route53

참고: route53을 도메인 DNS 공급자로 바꿉니다.

관련 정보

Lightsail 인스턴스에 표준 Let's Encrypt SSL 인증서를 설치하려면 어떻게 하나요?

AWS 공식
AWS 공식업데이트됨 일 년 전