certbot是专门为Let’s encrypt制作的一个管理证书工具,可以通过它来生成证书管理更新Let’s encrypt证书。
安装
- Installing snap on CentOS
1 | yum install epel-release |
1 | snap install core |
1 | yum remove certbot |
- Install Certbot
1 | snap install --classic certbot |
- Run Certbot
1 | certbot certonly --standalone |
- Automatic Renewal(nginx服务 80端口)
1 | sh -c 'printf "#!/bin/sh\nsystemctl stop nginx\n" > /etc/letsencrypt/renewal-hooks/pre/nginx.sh' |
安装(已过期)
- 下载
1 | wget https://dl.eff.org/certbot-auto |
- 安装
1 | mv certbot-auto /usr/local/bin/certbot-auto |
- 生成证书
1 | certbot-auto certonly --standalone -d www.themismin.com --pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx" |
- 设置自动更新
1 | # 每两个月2号4点16分 域名证书更新 |
问题1
OCSP check failed
OSCP 无法访问
1 | 在/etc/hosts中添加 |