yum install -y epel-release
yum install -y certbot
certbot certonly --webroot -w /home/public_html -d blog.brotherjh.com -m ftfoolish@163.com
注意:-w后面的目录有权限访问。 证书成功生成之后会出现以下信息:
IMPORTANT NOTES:
If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le
证书保存在:
```shell
/etc/letsencrypt/live/blog.brotherjh.com/
有效期为3个月。
[root@123]# crontab -e
//每月1号晚上2点更新并重启nginx
0 2 1 * * /usr/bin/certbot renew --quiet && /sbin/service nginx reload
//重启定时任务
[root@123]# /bin/systemctl restart crond.service
如有侵权请邮件通知