安装 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 &