Let’s Encrypt renewal 방법#
Let’s Encrypt에서 무료 HTTPS 인증서를 제공받아 사용하는 경우가 많습니다.
Let’s Encrypt 인증서의 유효기간은 90일이며 유효기간이 만료되기 전에 갱신하면 90일 연장됩니다.
인증서 갱신은 무제한 할 수 있습니다.
Certbot으로 갱신하는 방법#
Certbot은 Let’s Encrypt 인증서를 관리하는 Tool입니다.
Certbot을 통하여 인증서를 설치/갱신 등 관리하는 경우가 많습니다.
다음과 같은 순서를 통하여 갱신할 수 있습니다.
Step1. HTTPS 인증서를 사용하는 서버 중지#
다음은 httpd를 사용하는 경우의 예시 입니다.sudo service httpd stop 명령을 수행하여 httpd를 중지합니다.
$ sudo service httpd stop
Redirecting to /bin/systemctl stop httpd.serviceStep2-1. 인증서 갱신#
sudo certbot renew 명령을 수행하여 인증서를 갱신합니다.
$ sudo certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/xxx.com.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Renewing an existing certificate for xxx.com and www.xxx.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations, all renewals succeeded:
/etc/letsencrypt/live/xxx.com/fullchain.pem (success)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Step2-2. 갱신된 유효기간 확인#
sudo certbot certificates명령을 수행하여 유효기간이 갱신되었는지 확인합니다.
$ sudo certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Found the following certs:
Certificate Name: xxx.com
Serial Number:
Key Type:
Domains:
Expiry Date: 2024-12-02 12:38:55+00:00 (VALID: 89 days)
Certificate Path:
Private Key Path:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Step3. 서버를 재개합니다.#
sudo service httpd start 명령을 수행하여 httpd를 재개합니다.
$ sudo service httpd start
Redirecting to /bin/systemctl start httpd.service