Let’sEncrypt免費證書申請,其有效期爲三個月,不過到期會發提醒到你的郵箱
方法一
直接去網站www.sslforfree.com獲取,詳細看網頁內的說明。
方法二
編譯源碼的方式 , 環境 ubuntu14
先克隆源代碼:
root@ubu:/#cd /opt/ssl
root@ubu:/opt/ssl#git clone https://github.com/letsencrypt/letsencrypt
假定郵箱 email@domain.com
假定域名 domain.com
www.domain.com
a.domain.com
cd /opt/ssl/letsencrypt
root@ubu:/opt/ssl/letsencrypt#./letsencrypt-auto certonly --standalone --email <郵箱地址> -d domain.com -d www.domain.com -d a.domain.com
注:多個域名就加到結尾 -d some.domain.com, 編譯的時候一定要保證環境健全,如果報錯根據提示修復後在編譯
編譯成功後,最後會顯示類似如下的信息:
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at
/etc/letsencrypt/live/domain.com/fullchain.pem. Your cert will
expire on 2017-01-20. To obtain a new or tweaked version of this
certificate in the future, simply run letsencrypt-auto again. To
non-interactively renew *all* of your certificates, run
"letsencrypt-auto renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
根據其中的信息/etc/letsencrypt/live/domain.com/fullchain.pem
可知生成的證書文件在目錄/etc/letsencrypt/live/domain.com/
下
在live的子目錄中存在如下文件:
看到的都是軟連接,是吧!不過沒關係其真正的文件在archive目錄裏