設置域名
1. 將需要生成SSL證書的域名解析到IP地址
idealand.xyz ?<=> ?64.176.82.190
檢查防火墻的設置
1. 首先查看防火墻的狀態:
? ? # ufw status
2. 如果防火墻開啟了,要開放80和443端口用于certbot驗證
? ?# ufw allow 80
? ?# ufw allow 443
生成證書
1. 安裝certbot:?
? ?# apt install certbot
2. 生成證書:
? ?# certbot certonly
? ?輸入email: jinmin.si@outlook.com
? ?域名:idealand.xyz
3. 如果運行certbot的過程中斷線,再次運行前需要結束之前的進程:
? ?# ps -aux | grep certbot
? ?# kill 進程號(第二列的數字)
4. 證書生成成功,位于 /etc/letsencrypt/live/idealand.xyz/
? fullchain.pem為公鑰,privkey.pem為私鑰
以上如有錯漏之處,敬請大家指正。我的聯系方式:
微信:TobeBuda
Email/Paypal: jinmin.si@outlook.com
邀請您加入「社區互助服務」創業微信群,共同探討打造社區互助服務的美好未來。
2024年6月1日
本文參考資料:
https://blog.csdn.net/skyyemperor/article/details/113424148
https://zhuanlan.zhihu.com/p/571124400
?