申請Let's Encrypt通配符SSL證書

環(huán)境

系統(tǒng):CentOS 7.4

安裝Certbot

  • 安裝
    # wget https://dl.eff.org/certbot-auto
    # chmod a+x certbot-auto
    # mv certbot-auto /usr/local/bin/
    

申請證書

  • 申請

    # certbot-auto certonly -d '*.yourdomain.com' --manual --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory
    

    注:yourdomain.com替換為你自己的域名

    Enter email address (used for urgent renewal and security notices) (Enter 'c' to
    cancel): youremail@qq.com
    -------------------------------------------------------------------------------
    (A)gree/(C)ancel: A
    -------------------------------------------------------------------------------
    (Y)es/(N)o: N
    -------------------------------------------------------------------------------
    Are you OK with your IP being logged?
    (Y)es/(N)o: Y
    -------------------------------------------------------------------------------
    Please deploy a DNS TXT record under the name
    _acme-challenge.yourdomain.com with the following value:
    
    u5iIS3JKCUpFEjL0_F9F0LE12345678UgDcOISEtx8o
    
    Before continuing, verify the record is deployed.
    -------------------------------------------------------------------------------
    Press Enter to Continue
    
  • 添加DNS記錄
    記錄類型:TXT
    主機記錄:_acme-challenge.yourdomain.com,具體參考上一步
    記錄值:u5iIS3JKCUpFEjL0_F9F0LE12345678UgDcOISEtx8o,具體參考上一步

  • 驗證DNS記錄

    # dig -t txt _acme-challenge.yourdomain.com
    
  • 按回車,申請證書結(jié)束

其他

  • 備份證書

    # mkdir /data/cert/
    # cp /etc/letsencrypt/live/yourdomain.com/fullchain.pem /data/cert/yourdomain.com.pem.20180510
    # cp /etc/letsencrypt/live/yourdomain.com/privkey.pem /data/cert/yourdomain.com.key.20180510
    
  • 刪除DNS記錄

更新證書

步驟同申請證書

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容