zoukankan      html  css  js  c++  java
  • 生成Let's Encrypt证书

    通过certbot-auto自动生成工具来操作。

    下载

    wget https://dl.eff.org/certbot-auto
    chmod +x certbot-auto

    生成证书

    ./certbot-auto certonly --email ***@gmail.com -d *.xxx.cn -d xxx.cn --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory

    添加域名解析

    Please deploy a DNS TXT record under the name
    _acme-challenge.xxx.cn with the following value:
    
    KJhxf69xxxl01AxxxxYjwnixxxxglEugBEuxxxg
    
    Before continuing, verify the record is deployed.
    (This must be set up in addition to the previous challenges; do not remove,
    replace, or undo the previous challenge tasks yet. Note that you might be
    asked to create multiple distinct TXT records with the same name. This is
    permitted by DNS standards.)
    
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Press Enter to Continue

    验证TXT解析是否生效

    yum install -y bind-utils
    dig -t txt _acme-challenge.xxxx.cn @8.8.8.8

     续期

    ./certbot renew --dry-run
    

      

    更简单的方法,使用docker + acme.sh

    腾讯云域名

    docker run --rm -it -v /root/cert:/acme.sh -e DP_Id=*** -e DP_Key=*** neilpang/acme.sh --issue -d aaa.com -d *.aaa.com --dns dns_dp

    阿里云域名

    docker run --rm -it -v /root/cert:/acme.sh -e Ali_Key=*** -e Ali_Secret=*** neilpang/acme.sh --issue -d bbb.com -d *.bbb.com --dns dns_ali --force
    TryEverything
  • 相关阅读:
    git项目管理-合并请求
    记录一次git stash找回删除的存储
    chrome 下 position:fixed失效(react)
    css3 var变量
    rc-select下拉选择控件库推荐
    (转载)vue路径后面去除#号
    本地配置独立域名环境
    javascript判断pc还是手机端
    javascript复制到粘贴板的方案
    javascript轮播插件的使用(TouchSlide)
  • 原文地址:https://www.cnblogs.com/LiTry/p/10290137.html
Copyright © 2011-2022 走看看