1.下載壓縮包:
#wget https://github.com/certbot/certbot/archive/master.zipnginx
2.解壓包git
3.官方文檔
https://github.com/certbot/certbotgithub
建立的證書有90天的有效期,過時後須要續期web
1.建立單個證書
./certbot-auto certonly --webroot -w 網站目錄 -d 域名dom
2.建立多個證書
./certbot-auto certonly --webroot -w 網站目錄1 -d 域名1 -w 網站目錄2 -d 域名2網站
ps:
若是出現超時,能夠再次執行命令server
在server段配置:
ssl on;
ssl_certificate "/etc/letsencrypt/live/domain.com/fullchain.pem"; #請根據實際路徑
ssl_certificate_key "/etc/letsencrypt/live/domain.com/privkey.pem"; #請根據實際路徑ip
1.查看證書
./certbot-auto certificatesssl
2.續期(更新證書)
#模擬更新證書
./certbot-auto renew --dry-run
#實際更新證書
./certbot-auto renew文檔
#模擬更新單個證書
./certbot-auto renew --dry-run --cert-name domain.com
#實際更新單個證書
./certbot-auto renew --cert-name domain.com
3.吊銷證書./certbot-auto revoke --cert-path /etc/letsencrypt/live/domain.com/fullchain.pem