您好,登錄后才能下訂單哦!
這篇文章主要講解了“如何在centos下安裝Let’s Encrypt永久免費SSL證書”,文中的講解內容簡單清晰,易于學習與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學習“如何在centos下安裝Let’s Encrypt永久免費SSL證書”吧!
https證書,免費版,每三個月續簽一次,可以用過腳本自動續簽
ssh登錄到域名配置所在的主機(nginx,apache等)
安裝git yum -y install git
輸入 git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
chmod +x letsencrypt-auto
安裝證書:
wget http://mirror.centos.org/centos/6/os/x86_64/Packages/gdbm-1.8.0-39.el6.x86_64.rpm
yum localinstall gdbm-1.8.0-39.el6.x86_64.rpm
./letsencrypt-auto certonly --email 86533019@qq.com -d jenkins.jetbrains.org.cn
d參數后面對應的是域名,在執行的過程中,我遭遇了下面的報錯: Total size: 44 M Downloading Packages: Running rpm_check_debug ERROR with rpm_check_debug vs depsolve: libgdbm.so.2()(64bit) is needed by python-libs-2.6.6-66.el6_8.x86_64 ** Found 7 pre-existing rpmdb problem(s), 'yum check' output follows: 4:perl-5.10.1-141.el6_7.1.x86_64 has missing requires of libgdbm.so.2()(64bit) 4:perl-devel-5.10.1-141.el6_7.1.x86_64 has missing requires of gdbm-devel polkit-0.96-5.el6_4.x86_64 has missing requires of libeggdbus-1.so.0()(64bit) 2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of libmysqlclient.so.16()(64bit) 2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of libmysqlclient.so. 16(libmysqlclient_16)(64bit) 2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of mysql-libs python-libs-2.6.6-52.el6.x86_64 has missing requires of libgdbm.so.2()(64bit) Your transaction was saved, rerun it with: yum load-transactiontmp/.yum_save_tx-2017-04-07-22-1798AqLE.yumtx Could not install OS dependencies. Aborting bootstrap!
centos 6 需要安裝 libgdbm.so.2:
完成后,重新執行上面的命令行:
即為安裝完成
1. web服務器,為這里是nginx,在nginx中添加代碼: listen 443 ssl; ssl on; ssl_certificate /etc/letsencrypt/live/XXX.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/XXX.com/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 2. 重啟nginx,就可以放了https了
##續約 1. linux中執行 crontab -e 2. 添加代碼
`06 06 * * * /www/web/test/lets/certbot-master/certbot-auto renew --force-renewal --pre-hook "/etc/init.d/nginx stop" --post-hook "/etc/init.d/nginx start" >> /www/web_logs/letsencry.log 2>&1`
感謝各位的閱讀,以上就是“如何在centos下安裝Let’s Encrypt永久免費SSL證書”的內容了,經過本文的學習后,相信大家對如何在centos下安裝Let’s Encrypt永久免費SSL證書這一問題有了更深刻的體會,具體使用情況還需要大家實踐驗證。這里是億速云,小編將為大家推送更多相關知識點的文章,歡迎關注!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。