标签:arch txt roo err rtb ofo 动手 lease api
https证书申请通过Let‘ s Encrypt进行免费https证书申请
安装certbot
yum install epel-release -y
yum install certbot
certbot certonly -d *.test.com --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory
完成后会显示域名所在目录
4、自动续期
echo "0 0,12 * * * root python -c ‘import random; import time; time.sleep(random.random() * 3600)‘ && certbot renew" | sudo tee -a /etc/crontab > /dev/null
默认到期前30天续期,如果不满足可手动配置
/etc/letsencrypt/renewal/test.conf
5、证书清理
如果不想要了或者其他原因需要清理,执行以下命令即可
rm -rf /etc/letsencrypt/live/www.example.com/
rm -rf /etc/letsencrypt/archive/www.example.com/
rm /etc/letsencrypt/renewal/www.example.com.conf
标签:arch txt roo err rtb ofo 动手 lease api
原文地址:https://blog.51cto.com/11962757/2454255