汇成软件 Create the world!!!

Let's Encrypt 在Centos 7.6+Nginx环境下申请范解析证书--自动申请与部署更新

 Let's Encrypt 在Centos 7.6+Nginx环境下申请范解析证书--自动申请与部署更新

安装依赖

yum install -y socat

安装 acme

curl https://get.acme.sh | sh 或者 wget -O - https://get.acme.sh | sh


crontab -l

导入腾讯token

export DP_Id="###"

export DP_Key="####"


申请证书

/root/.acme.sh/acme.sh --issue --dns dns_dp -d example.com -d *.example.com





nginx 部署证书--以后会自动部署


acme.sh --installcert -d example.com  \


--key-file       /etc/letsencrypt/live/www.example.com/privkey.pem \


--fullchain-file /etc/letsencrypt/live/www.example.com/fullchain.pem \


--reloadcmd     "service nginx reload"


或者

acme.sh --installcert -d example.com  --key-file       /etc/letsencrypt/live/www.example.com/privkey.pem --fullchain-file /etc/letsencrypt/live/www.example.com/fullchain.pem --reloadcmd     "service nginx reload"


查看每天任务

crontab -l


手动强制更新证书

acme.sh --renew -d example.com --force


查看证书列表


acme.sh --list


停止 Renew


acme.sh --remove -d example.com

之后手动把目录下的证书移除就行。


参考文档:https://zhuanlan.zhihu.com/p/347064501

                 http://www.manongjc.com/detail/51-avncjkrokejmoty.html

上面两位作者


作者:admin 分类:Linux 浏览:466 评论:0
留言列表
发表评论
来宾的头像