使用acme.sh签发Let's Encrypt的免费数字证书

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

转载于:https://www.cnblogs.com/suminem/p/11607003.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值