永久免费的SSL证书 - Let's Encrypt 证书部署 HTTPS 并自动续期

安装 certbot

yum install certbot

获取证书

certbot certonly --webroot -w /usr/share/nginx/html -d 要配置证书的域名 -d 要配置证书的域名

证书成功后需要conf中有dhparam.pem 文件

证书自动续期

certbot renew --dry-run

编写定时任务

30 4 * * 1 certbot renew --renew-hook "systemctl reload nginx" --quiet > /dev/null 2>&1 &

你可能感兴趣的:(永久免费的SSL证书 - Let's Encrypt 证书部署 HTTPS 并自动续期)