前言
- certbot-auto申请证书时发现如下提示:certbot-auto被弃用了
1
2
3
4Skipping bootstrap because certbot-auto is deprecated on this system.
Your system is not supported by certbot-auto anymore.
Certbot cannot be installed.
Please visit https://certbot.eff.org/ to check for other alternatives. - 根据github的issue看到作者的回应
github的issue: https://github.com/certbot/certbot/issues/8535
安装snap
1 | # 将EPEL添加到CentOS 7 |
卸载旧的certbot
1 | # 以前没有装过的不用这一步 |
安装certbot
1 | # 安装certbot |
申请泛域名证书和自动续期
申请前准备
当前工具支持阿里云 DNS、腾讯云 DNS、华为云 NDS、GoDaddy(certbot 官方没有对应的插件)。
1
2
3
4
5 git clone https://github.com/ywdblog/certbot-letencrypt-wildcardcertificates-alydns-au
cd certbot-letencrypt-wildcardcertificates-alydns-au
chmod 0777 au.sh
申请证书
详细的参数说明到github查看: https://github.com/ywdblog/certbot-letencrypt-wildcardcertificates-alydns-au
1 | # 例子(这些参数根据自己的情况填写) |
自动续期
上面已经成功申请到证书了, 但是只有三个月的有效期,需要定时续期,编辑/etc/crontab,添加定时任务
1
2 #证书有效期<30天才会renew,所以crontab可以配置为1天或1周
1 1 */1 * * root certbot renew --cert-name simplehttps.com --manual-auth-hook "/脚本目录/au.sh php aly add" --manual-cleanup-hook "/脚本目录/au.sh php aly clean"
...
...
00:00
00:00
If you like this blog or find it useful for you, you are welcome to comment on it. You are also welcome to share this blog, so that more people can participate in it. If the images used in the blog infringe your copyright, please contact the author to delete them. Thank you !