Let's Encryptの更新(手動)


Let's Encryptの手動更新の方法(備忘録)

ホントは自動更新したいけどcronがうまく機能しないので仕方なく手動でやる(気が向いたら自動更新も調べる)

rootユーザーで入る

[ec2-user@ip-172-31-36-245 git_toreka]$ sudo -i

下記コマンドを打つ

[root@ip-172-31-36-245 ~]# /usr/local/bin/certbot-auto renew --post-hook "sudo service httpd restart"

こんな感じで出たらOK

Upgrading certbot-auto 1.11.0 to 1.14.0...
Replacing certbot-auto...
Your system is not supported by certbot-auto anymore.
certbot-auto and its Certbot installation will no longer receive updates.
You will not receive any bug fixes including those fixing server compatibility
or security problems.
Please visit https://certbot.eff.org/ to check for other alternatives.
Saving debug log to /var/log/letsencrypt/letsencrypt.log

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/torekabodymake.com.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert not yet due for renewal

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The following certificates are not due for renewal yet:
  /etc/letsencrypt/live/torekabodymake.com/fullchain.pem expires on 2021-07-10 (skipped)
No renewals were attempted.
No hooks were run.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

2021-07-10と3ヶ月後の日付が書いてあるので成功してる(はず)

自動更新ができるようになるまではとりあえずコレで行きます。
少し前にやったことがどんどん忘れていってしまうので、なにかやったらこうやって簡単にでも記録するようにします。