oxo1 簡介
Let’s Encrypt是一個免費、自動化、開放的證書頒發機構,該項目得到了Mozilla基金會,Akamai以及思科等很多大型機構的支持。Let’s Encrypt發佈的免費SSL證書能被許多瀏覽器信任,雖然申請的SSL/TLS證書只有3個月有效期,但是可以通過官方提供的工具自動續期,從而達到永久免費使用的目的。
官網目前推薦的獲取和安裝方式是certbot,只需要簡單運行一些命令並作一些配置即可。
0x02 安裝Certbot
Certbot官網根據不同的操作系統,提供的詳盡的安裝方法,這裏安裝的是CentOS 7,故以centos7 爲慄。
$ sudo yum install epel-release
$ wget https://dl.eff.org/certbot-auto
$ chmod a+x certbot-auto
$ ./certbot #然後會自動安裝所需的依賴包
0x03 使用Certbot
Certbot has a fairly solid beta-quality Apache plugin, which is supported on many platforms, and automates both obtaining and installing certs:
翻譯: Certbot有一個相當堅實的測試質量的Apache插件, 它支持在很多平臺上, 並自動兩種獲取和安裝證書:
0x04 自動renew證書
一:模擬證書renew
$ sudo certbot renew --dry-run
二:安裝證書
$ sudo certbot renew
若出現以下提示 renew失敗
$ sudo certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/zhukun.net.conf
-------------------------------------------------------------------------------
Cert not yet due for renewal
The following certs are not due for renewal yet:
/etc/letsencrypt/live/zhukun.net/fullchain.pem (skipped)
No renewals were attempted.
強制執行成功
sudo certbot-auto renew --force-renew
重啓服務 還是沒成功 查看下/var/log/letsencrypt/letsencrypt.log
日誌
呀!storage了key但是404了,這裏手動改下服務器配置。success!!!