新增cert证书
安装证书
要提前安装cron和socat
apt-get install cron
apt-get install socat
安装脚本
curl https://get.acme.sh | sh -s [email protected]
切换证书免费机构
~/.acme.sh/acme.sh --set-default-ca --server letsencrypt
DNS申请证书
acme.sh 目前支持 cloudflare, dnspod, cloudxns, godaddy 以及 ovh 等数十种解析商的自动集成.
export CF_Key="9f21c4ca8cdcb3758bd37a8a7a0345e3ea831"
export CF_Email="[email protected]"
最好一次申请一个
~/.acme.sh/acme.sh --issue --dns dns_cf -d ttk.pubfun.top ###cloudflare
~/.acme.sh/acme.sh --issue --dns dns_dp -d ttk.pubfun.top ###dnspod
也可以申请通配域名, * 需要转译
~/.acme.sh/acme.sh --issue --dns dns_cf -d \*.pubfun.top ###cloudflare
~/.acme.sh/acme.sh --issue --dns dns_dp -d \*.pubfun.top ###dnspod
自定义证书路径
~/.acme.sh/acme.sh --installcert -d ttk.pubfun.top --key-file /root/cert/ttk.pubfun.top.key --fullchain-file /root/cert/ttk.pubfun.top.crt
~/.acme.sh/acme.sh --installcert -d cdnttk.pubfun.top --key-file /root/cert/cdnttk.pubfun.top.key --fullchain-file /root/cert/cdnttk.pubfun.top.crt
设置自动更新
~/.acme.sh/acme.sh --upgrade --auto-upgrade
设置权限
chmod -R 755 /root/cert
查看证书列表
~/.acme.sh/acme.sh --list
删除证书和定时
~/.acme.sh/acme.sh --remove -d ttk.pubfun.top
强制更新证书
~/.acme.sh/acme.sh --upgrade --force #升级并强制更新所有证书。
~/.acme.sh/acme.sh --renew-all #强制更新所有已存在的证书。
~/.acme.sh/acme.sh --renew -d example.com #强制更新指定域名的证书
Tags : cert证书
所有原创文章采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可。
您可以自由的转载和修改,但请务必注明文章来源并且不可用于商业目的。
本站部分内容收集于互联网,如果有侵权内容、不妥之处,请联系我们删除。敬请谅解!