2019-06-12

let's encrypt及certobot-auto使用DNS验证方式注册证书

简要说明:使用manual插件,之后将letsencrypt验证所需DNS记录(TXT)加入DNS后,再进行验证

安装certbot的过程请看官方网站:https://certbot.eff.org/

[code language="bash"]ertbot-auto -d im.leiex.com --manual --preferred-challenges dns certonly[/code]

注意根据提示设定DNS的TXT记录,设定好后,再输入Enter确认

[code language="bash"]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

<code>Please deploy a DNS TXT record under the name
XXXXXX.im.leiex.com with the following value:</code>

XXXXXXXXX

&nbsp;

Before continuing, verify the record is deployed.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


Press Enter to Continue
[/code]

letsencrypt的证书有效期只有90天,通过验证后,不要移动证书的位置,在crontab中加入更新证书的命令

[code language="bash"]
0 0,12 * * * python -c 'import random; import time; time.sleep(random.random() * 3600)' &amp;&amp; /usr/bin/certbot-auto renew
[/code]

[wpedon id=230]

没有评论:

发表评论