--------------安装----------------
curl https://get.acme.sh | sh
#让alias生效
source ~/.bashrc
-------------设置DNS API------------
在dns运营商网站设置DNS API的API KEY/SECRET KEY
#例如阿里云,域名所在账号登录后,进入如下页面进行设置 https://usercenter.console.aliyun.com/#/manage/ak
# 得到key和Secret执行以下两行
export Ali_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
export Ali_Secret="jlsdflanljkljlfdsaklkjflsa"
-------------申请签发证书--------------
#可以多个域名同时申请,也可以是泛域名
acme.sh --issue --dns dns_ali -d smallpay.cn -d *.smallpay.com
#显示得到证书信息
#[Thu Sep 26 12:29:40 CST 2019] Your cert is in /root/.acme.sh/*.smallpay.com/*.smallpay.com.cer
#[Thu Sep 26 12:29:40 CST 2019] Your cert key is in /root/.acme.sh/*.smallpay.com/*.smallpay.com.key
#[Thu Sep 26 12:29:40 CST 2019] The intermediate CA cert is in /root/.acme.sh/*.smallpay.com/ca.cer
#[Thu Sep 26 12:29:40 CST 2019] And the full chain certs is there: /root/.acme.sh/*.smallpay.com/fullchain.cer
-------------acme会自动添加crontab-----
#检查下crontab,到期会自动续
#crontab -l
#43 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null