CentOS 6

  1. 建立 /root/lets-encrypt/authenticator.sh
    cd /root/lets-encrypt/
    wget https://svn.ichiayi.com/opensvn/opentrysoft/certbot/authenticator.sh
    chmod a+x authenticator.sh
  2. 建立 /root/lets-encrypt/cleanup.sh
    cd /root/lets-encrypt/
    wget https://svn.ichiayi.com/opensvn/opentrysoft/certbot/cleanup.sh
    chmod a+x cleanup.sh
  3. 取得 CloudFlare 的 Zone ID 與 Global API Key 更改 authenticator.sh 與 cleanup.sh 內容
    :
    API_KEY="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    EMAIL="[email protected]"
    ZONE_ID="xxxxxxxxxxxxxxx"
    :

    看 CloudFlare 取得 Zone ID / Global API Key 畫面

  4. 執行取得 SSL 憑證命令 Exp. erp.ichiayi.com
    /root/lets-encrypt/certbot-auto certonly --manual --preferred-challenges=dns --manual-auth-hook /root/lets-encrypt/authenticator.sh --manual-cleanup-hook /root/lets-encrypt/cleanup.sh -d erp.ichiayi.com