certbot-auto不再支持所有的操作系统!根据作者的说法,certbot团队认为维护certbot-auto在几乎所有流行的UNIX系统以及各种环境上的正常运行是一项繁重的工作,加之certbot-auto是基于python 2编写的,而python 2即
certbot-auto不再支持所有的操作系统!根据作者的说法,certbot团队认为维护certbot-auto在几乎所有流行的UNIX系统以及各种环境上的正常运行是一项繁重的工作,加之certbot-auto是基于python 2编写的,而python 2即将寿终正寝,将certbot-auto迁移至python 3需要大量工作,这非常困难,因此团队决定放弃certbot-auto的维护。
既然如此,现在我们还能继续使用certbot吗?certbot团队使用了基于snap的新的分发方法。
Cerbot官网:https://certbot.eff.org/
1. 环境
操作系统:CentOS 7
Webserver:Nginx
2. 安装letsencrypt
2.1. 安装letsencrypt之前,需要先安装snaps。
a. 先安装epel。
yum install epel-releaseb. 安装snapd。
yum install snapdc. 启用snapd.socket。
systemctl enable --now snapd.socketd. 创建/var/lib/snapd/snap和/snap之间的链接。
ln -s /var/lib/snapd/snap /snape. 退出账号并重新登录,或者重启系统,确保snap启用。
shutdown -r nowf. 将snap更新至最新版本。
snap install core
snap refresh core2.2. 卸载已安装的certbot。
如果之前在系统上已经部署过certbot,则需要先将其进行卸载。
a. 卸载certbot。
yum remove certbotb. 根据certbot安装位置删除相关文件。
rm /usr/local/bin/certbot-autoc. 删除certbot附加软件包。
rm -rf /opt/eff.org/certbot2.3. 安装certbot。
a. 通过snap安装certbot。
snap install --classic certbotb. 创建/snap/bin/certbot的软链接,方便certbot命令的使用。
ln -s /snap/bin/certbot /usr/bin/certbot3. letsencrypt的使用
3.1. 获取证书。
a. 生成证书。
生成单域名证书
certbot certonly --nginx --email xxx@mail.com -d a.do.com这里可能会报错,我们只需指定nginx.conf路径即可
指定nginx并生成证书
certbot --nginx-server-root=/usr/local/nginx/conf --nginx certonly -d a.example.com生成泛域名证书
certbot certonly --manual --preferred-challenges dns -d *. example.com -d example.com --server https://acme-v02.api.letsencrypt.org/directoryb. 更新nginx配置并重启nginx。
3.2. 更新证书。
certbot renew
或者
certbot renew --dry-run本文标题为:新版Letsencrypt证书申请及安装流程
基础教程推荐
- Docker容器操作方法详解 2022-11-13
- RFO SIG之openEuler AWS AMI 制作详解 2022-12-28
- Apache CarbonData 1.0.0发布及其新特性介绍 2023-09-11
- 为Win2003服务器打造铜墙铁壁的方法步骤 2022-09-01
- 通过StatefulSet部署有状态服务应用实现方式 2022-10-01
- Apache Kafka 2.5 稳定版发布,新特性抢先看 2023-09-11
- windows环境下apache-apollo服务器搭建 2023-09-10
- Centos 安装Django2.1 2023-09-24
- Centos7 nginx的安装以及开机自启动的设置 2023-09-22
- P3 利用Vulnhub复现漏洞 - Apache SSI 远程命令执行漏洞 2023-09-10
