1,安装 acme.sh

curl  https://get.acme.sh | sh

说明:并创建 一个 bash 的 alias, 方便你的使用: alias acme.sh=~/.acme.sh/acme.sh

自动为你创建 cronjob, 每天 0:00 点自动检测所有的证书, 如果快过期了, 需要更新, 则会自动更新证书.

安装过程不会污染已有的系统任何功能和文件, 所有的修改都限制在安装目录中: ~/.acme.sh
2,登陆DNSPOD 创建密钥的token(域名的解析权 必须在dnspod)
DNSPOD API token 快速申请SSL 证书_第1张图片
会生成token和ID(小心保管)
DNSPOD API token 快速申请SSL 证书_第2张图片
3,申请证书
DNSPod.cn选项:
DNSPod.cn域API选项要求您首先登录帐户以获得DNSPod API密钥和ID。

export DP_Id="1234"
export DP_Key="sADDsdasdgdsf"
acme.sh --issue --dns dns_dp -d example.com -d www.example.com   ##需要在root 账户下申请,ubuntu 使用sudo -s 切换用户
##DP_Id和DP_Key将被保存~/.acme.sh/account.conf,需要时会被重用。
##生成的证书在/home/ubuntu/.acme.sh/xxx.xxx 目录下

相关链接:
安装说明:https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E
api使用说明:https://github.com/acmesh-official/acme.sh/wiki/dnsapi#2-dnspodcn-option