安装 Let‘s Encrypt
SSL 证书续期改为3个月一续,就变得麻烦了,还好有 Let‘s Encrypt 😄
# 安装 snapd
apt -y install snapd
# 启用管理主 snap 通信套接字的 systemd 单元
systemctl enable --now snapd.socket
# 快捷方式
# ln -s /var/lib/snapd/snap /snap
# 安装 certbot
snap install --classic certbot
# 快捷方式
ln -s /snap/bin/certbot /usr/bin/certbot
# 如果是nginx,申请证书并部署
certbot --nginx
# 测试自动续订
certbot renew --dry-run