Let’s Encrypt 무료 SSL 인증서 갱신하기
Let’s Encrypt 무료 SSL 인증서는 3개월단위로 인증서가 발급됩니다.
매번 체크해서 인증서를 갱신할기보다는 Crontab에 등록하여 3개월마다
갱신되게 아래와 같이 스크립트생성후 crontab에 등록하는 과정을 메모합니다.
Shell Script 생성
touch /root/letsencrypt.sh
권한부여
chmod 755 /root/letsencrypt.sh
Shell Script 내용추가
vi /root/letsencrypt.sh #!/bin/sh /etc/init.d/nginx stop if ! /root/tools/letsencrypt/letsencrypt-auto renew > /var/log/letsencrypt-renew.log 2>&1 ; then echo Automated renew failed; cat /var/log/letsencrypt-renew.log exit 1 fi /etc/init.d/nginx start
crontab 아래 내용 추가
vi /etc/crontab 30 0 1 1-12/3 * root /root/letsencrypt.sh
[…] 해주는 방법입니다. 이 방법은 크론탭과 쉡 스크립트를 사용한 방법으로 Let’s Encrypt 무료 SSL 인증서 갱신하기라는 글을 […]
[…] 해주는 방법입니다. 이 방법은 크론탭과 쉡 스크립트를 사용한 방법으로 Let’s Encrypt 무료 SSL 인증서 갱신하기라는 글을 […]