目次

18 Let's Encrypt Certbot

Docker版は→ 10 Docker Let's Encrypt

1.snapdインストール

yum -y install epel-release
yum -y install snapd

2.snapd準備

systemctl enable --now snapd.socket
ln -s /var/lib/snapd/snap /snap

3.snapdアップデート

※1度ログアウト後、再度ログインしてから実行

snap install core
snap refresh core

4.certbotインストール

snap install --classic certbot

5.証明書作成

certbot certonly --webroot -w /var/www/html -d hogehoge.com

6.証明書更新

certbot renew

7.crontabで更新

certbot renew --renew-hook "systemctl restart httpd" -q >> /var/log/certbot-renew.log